Skip to content

Commit

Permalink
secret: use global --output/-o flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Mate Ory authored and orymate committed Jan 8, 2019
1 parent 3968447 commit 94e08cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions internal/cli/command/organization/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,11 @@ func NewListCommand(banzaiCli cli.Cli) *cobra.Command {
Short: "List organizations",
Args: cobra.NoArgs,
Run: func(cmd *cobra.Command, args []string) {
options.format, _ = cmd.Flags().GetString("output")
runList(banzaiCli, options)
},
}

flags := cmd.Flags()

flags.StringVarP(&options.format, "format", "f", "default", "Output format (default|yaml|json)")

return cmd
}

Expand Down
2 changes: 1 addition & 1 deletion internal/cli/command/secret/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ func NewListCommand(banzaiCli cli.Cli) *cobra.Command {
Short: "List secrets",
Args: cobra.NoArgs,
Run: func(cmd *cobra.Command, args []string) {
options.format, _ = cmd.Flags().GetString("output")
runList(banzaiCli, options)
},
}

flags := cmd.Flags()

flags.StringVarP(&options.format, "format", "f", "default", "Output format (default|yaml|json)")
flags.StringVarP(&options.secretType, "type", "t", "", "Filter list to the given type")

return cmd
Expand Down

0 comments on commit 94e08cb

Please sign in to comment.