MCPcopy
hub / github.com/spf13/cobra / hasNoOptDefVal

Function hasNoOptDefVal

command.go:654–660  ·  view source on GitHub ↗
(name string, fs *flag.FlagSet)

Source from the content-addressed store, hash-verified

652}
653
654func hasNoOptDefVal(name string, fs *flag.FlagSet) bool {
655 flag := fs.Lookup(name)
656 if flag == nil {
657 return false
658 }
659 return flag.NoOptDefVal != ""
660}
661
662func shortHasNoOptDefVal(name string, fs *flag.FlagSet) bool {
663 if len(name) == 0 {

Callers 3

stripFlagsFunction · 0.85
argsMinusFirstXMethod · 0.85
TraverseMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected