From 0967a36905aa53f6c2ea6ac92481f4d5a0666344 Mon Sep 17 00:00:00 2001 From: Sean Pino Date: Tue, 20 Feb 2024 10:54:19 -0500 Subject: [PATCH] simplify mark flags --- shell_completions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell_completions.go b/shell_completions.go index 594c106..376c60d 100644 --- a/shell_completions.go +++ b/shell_completions.go @@ -58,7 +58,7 @@ func MarkFlagRequired(flags *pflag.FlagSet, name string) error { // and causes your command to report an error if invoked without any of the flags. func MarkFlagsRequired(flags *pflag.FlagSet, names ...string) error { for _, name := range names { - if err := flags.SetAnnotation(name, BashCompOneRequiredFlag, []string{"true"}); err != nil { + if err := MarkFlagRequired(flags, name); err != nil { return err } }