mirror of
https://github.com/passbolt/go-passbolt-cli.git
synced 2025-05-11 18:48:21 +00:00
Add Output Json Flag
This commit is contained in:
parent
45fe21119b
commit
46ceb8176d
3 changed files with 3 additions and 0 deletions
|
@ -18,6 +18,7 @@ var createCmd = &cobra.Command{
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
rootCmd.AddCommand(createCmd)
|
rootCmd.AddCommand(createCmd)
|
||||||
|
createCmd.PersistentFlags().BoolP("json", "j", false, "Output JSON")
|
||||||
createCmd.AddCommand(resource.ResourceCreateCmd)
|
createCmd.AddCommand(resource.ResourceCreateCmd)
|
||||||
createCmd.AddCommand(folder.FolderCreateCmd)
|
createCmd.AddCommand(folder.FolderCreateCmd)
|
||||||
createCmd.AddCommand(group.GroupCreateCmd)
|
createCmd.AddCommand(group.GroupCreateCmd)
|
||||||
|
|
|
@ -18,6 +18,7 @@ var getCmd = &cobra.Command{
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
rootCmd.AddCommand(getCmd)
|
rootCmd.AddCommand(getCmd)
|
||||||
|
getCmd.PersistentFlags().BoolP("json", "j", false, "Output JSON")
|
||||||
getCmd.AddCommand(resource.ResourceGetCmd)
|
getCmd.AddCommand(resource.ResourceGetCmd)
|
||||||
getCmd.AddCommand(folder.FolderGetCmd)
|
getCmd.AddCommand(folder.FolderGetCmd)
|
||||||
getCmd.AddCommand(group.GroupGetCmd)
|
getCmd.AddCommand(group.GroupGetCmd)
|
||||||
|
|
|
@ -18,6 +18,7 @@ var listCmd = &cobra.Command{
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
rootCmd.AddCommand(listCmd)
|
rootCmd.AddCommand(listCmd)
|
||||||
|
listCmd.PersistentFlags().BoolP("json", "j", false, "Output JSON")
|
||||||
listCmd.AddCommand(resource.ResourceListCmd)
|
listCmd.AddCommand(resource.ResourceListCmd)
|
||||||
listCmd.AddCommand(folder.FolderListCmd)
|
listCmd.AddCommand(folder.FolderListCmd)
|
||||||
listCmd.AddCommand(group.GroupListCmd)
|
listCmd.AddCommand(group.GroupListCmd)
|
||||||
|
|
Loading…
Add table
Reference in a new issue