diff --git a/cmd/insights/insights.go b/cmd/insights/insights.go index 2a7b112..de426e4 100644 --- a/cmd/insights/insights.go +++ b/cmd/insights/insights.go @@ -2,6 +2,8 @@ package insights import ( "github.com/spf13/cobra" + + "github.com/open-sauced/pizza-cli/pkg/constants" ) // NewInsightsCommand returns a new cobra command for 'pizza insights' @@ -14,6 +16,7 @@ func NewInsightsCommand() *cobra.Command { return cmd.Help() }, } + cmd.PersistentFlags().StringP(constants.FlagNameOutput, "o", constants.OutputTable, "The formatting for command output. One of: (table, yaml, csv, json)") cmd.AddCommand(NewContributorsCommand()) cmd.AddCommand(NewRepositoriesCommand()) cmd.AddCommand(NewUserContributionsCommand()) diff --git a/cmd/root/root.go b/cmd/root/root.go index 0bf2a45..445693c 100644 --- a/cmd/root/root.go +++ b/cmd/root/root.go @@ -35,7 +35,6 @@ func NewRootCommand() (*cobra.Command, error) { cmd.PersistentFlags().StringP(constants.FlagNameEndpoint, "e", constants.EndpointProd, "The API endpoint to send requests to") cmd.PersistentFlags().Bool(constants.FlagNameBeta, false, fmt.Sprintf("Shorthand for using the beta OpenSauced API endpoint (\"%s\"). Supersedes the '--%s' flag", constants.EndpointBeta, constants.FlagNameEndpoint)) cmd.PersistentFlags().Bool(constants.FlagNameTelemetry, false, "Disable sending telemetry data to OpenSauced") - cmd.PersistentFlags().StringP(constants.FlagNameOutput, "o", constants.OutputTable, "The formatting for command output. One of: (table, yaml, csv, json)") cmd.PersistentFlags().StringP("config", "c", "~/.sauced.yaml", "The saucectl config") cmd.PersistentFlags().StringP("log-level", "l", "info", "The logging level. Options: error, warn, info, debug") cmd.PersistentFlags().Bool("tty-disable", false, "Disable log stylization. Suitable for CI/CD and automation")