mirror of
https://github.com/spf13/cobra
synced 2024-11-24 14:47:12 +00:00
some minor updates to tests
This commit is contained in:
parent
f3eb417cf8
commit
8be60dc5cd
1 changed files with 2 additions and 2 deletions
|
@ -24,7 +24,7 @@ func TestHiddenFlagExecutes(t *testing.T) {
|
|||
}
|
||||
|
||||
//
|
||||
boringCmd.Flags().BoolVarP(&secretFlag, "secret", "s", false, "makes commands run in super secret mode")
|
||||
boringCmd.Flags().BoolVarP(&secretFlag, "secret", "s", false, "makes this command run in super secret mode")
|
||||
boringCmd.Flags().MarkHidden("secret")
|
||||
|
||||
//
|
||||
|
@ -76,7 +76,7 @@ func TestHiddenFlagsAreHidden(t *testing.T) {
|
|||
|
||||
//
|
||||
boringCmd.PersistentFlags().BoolVarP(&persistentSecretFlag, "Secret", "S", false, "run any sub command in super secret mode")
|
||||
boringCmd.Flags().MarkHidden("Secret")
|
||||
boringCmd.PersistentFlags().MarkHidden("Secret")
|
||||
|
||||
// if a command has inherited flags, they will appear in usage/help text
|
||||
if boringCmd.HasInheritedFlags() {
|
||||
|
|
Loading…
Reference in a new issue