We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 323e55a commit 6db81e1Copy full SHA for 6db81e1
1 file changed
internal/requestflag/requestflag.go
@@ -28,6 +28,7 @@ type Flag[
28
Sources cli.ValueSourceChain // sources to load flag value from
29
Required bool // whether the flag is required or not
30
Hidden bool // whether to hide the flag in help output
31
+ Local bool // whether or not this flag should be applied to subcommands
32
Default T // default value for this flag if not set by from any source
33
Aliases []string // aliases that are allowed for this flag
34
Validator func(T) error // custom function to validate this flag value
@@ -55,6 +56,10 @@ type InRequest interface {
55
56
IsBodyRoot() bool
57
}
58
59
+func (f Flag[T]) IsLocal() bool {
60
+ return f.Local
61
+}
62
+
63
func (f Flag[T]) GetQueryPath() string {
64
return f.QueryPath
65
0 commit comments