Open
Description
To avoid getting flags out of sync if we ever change them, the viper names should use constants. So instead of:
cmd.Flags().String("foo", "", "it does stuff")
...
foo := viper.GetString("foo")
do this:
const fooFlag := "foo"
cmd.Flags().String(fooFlag , "", "it does stuff")
...
foo := viper.GetString(fooFlag )
Keep the flags related to whatever commands they reference. No need to reference variables from way across the project.
Metadata
Metadata
Assignees
Labels
No labels