From 7d0c6e3199cbe1dd15e94d9c95b16d8109254dc3 Mon Sep 17 00:00:00 2001 From: Alekzus Date: Mon, 14 Mar 2022 17:22:28 +0100 Subject: [PATCH] add --json flag to command --- cmd/create.go | 1 + cmd/get.go | 1 + cmd/list.go | 1 + 3 files changed, 3 insertions(+) diff --git a/cmd/create.go b/cmd/create.go index c758b86..1adfa78 100644 --- a/cmd/create.go +++ b/cmd/create.go @@ -18,6 +18,7 @@ var createCmd = &cobra.Command{ func init() { rootCmd.AddCommand(createCmd) + createCmd.PersistentFlags().BoolP("json", "j", false, "Outputs JSON") createCmd.AddCommand(resource.ResourceCreateCmd) createCmd.AddCommand(folder.FolderCreateCmd) createCmd.AddCommand(group.GroupCreateCmd) diff --git a/cmd/get.go b/cmd/get.go index 24fbc33..e3f814a 100644 --- a/cmd/get.go +++ b/cmd/get.go @@ -18,6 +18,7 @@ var getCmd = &cobra.Command{ func init() { rootCmd.AddCommand(getCmd) + getCmd.PersistentFlags().BoolP("json", "j", false, "Outputs JSON") getCmd.AddCommand(resource.ResourceGetCmd) getCmd.AddCommand(folder.FolderGetCmd) getCmd.AddCommand(group.GroupGetCmd) diff --git a/cmd/list.go b/cmd/list.go index f4672aa..a3044dd 100644 --- a/cmd/list.go +++ b/cmd/list.go @@ -18,6 +18,7 @@ var listCmd = &cobra.Command{ func init() { rootCmd.AddCommand(listCmd) + listCmd.PersistentFlags().BoolP("json", "j", false, "Outputs JSON") listCmd.AddCommand(resource.ResourceListCmd) listCmd.AddCommand(folder.FolderListCmd) listCmd.AddCommand(group.GroupListCmd)