diff --git a/cmd/gateway/commands.go b/cmd/gateway/commands.go index a76a859c9e..f43cebbb40 100644 --- a/cmd/gateway/commands.go +++ b/cmd/gateway/commands.go @@ -30,7 +30,9 @@ const ( func createRootCommand() *cobra.Command { rootCmd := &cobra.Command{ - Use: "gateway", + Use: "gateway", + SilenceUsage: true, + SilenceErrors: true, RunE: func(cmd *cobra.Command, args []string) error { return cmd.Help() }, @@ -93,9 +95,8 @@ func createStaticModeCommand() *cobra.Command { ) cmd := &cobra.Command{ - Use: "static-mode", - Short: "Configure NGINX in the scope of a single Gateway resource", - SilenceUsage: true, + Use: "static-mode", + Short: "Configure NGINX in the scope of a single Gateway resource", RunE: func(cmd *cobra.Command, args []string) error { atom := zap.NewAtomicLevel()