Replace flag text with const (#1391)

This commit is contained in:
Ta-Ching Chen
2019-11-09 22:13:35 +08:00
committed by GitHub
parent 6f5f6900b6
commit d3d8ff6c1b
73 changed files with 867 additions and 926 deletions
+3 -3
View File
@@ -36,8 +36,8 @@ func App() *cobra.Command {
Long: usage,
//SilenceUsage: true,
PreRunE: wrapper.Wrapper(
func(flags cli.Input) error {
console.Verbosity = flags.Int(flagkey.Verbosity)
func(input cli.Input) error {
console.Verbosity = input.Int(flagkey.Verbosity)
return nil
},
),
@@ -51,7 +51,7 @@ func App() *cobra.Command {
})
wrapper.SetFlags(rootCmd, flag.FlagSet{
Optional: []flag.Flag{flag.GlobalServerFlag, flag.GlobalVerbosityFlag},
Optional: []flag.Flag{flag.GlobalServer, flag.GlobalVerbosity},
})
groups := helptemplate.CommandGroups{}