MCPcopy
hub / github.com/spf13/pflag / lookup

Method lookup

flag.go:399–401  ·  view source on GitHub ↗

lookup returns the Flag structure of the named flag, returning nil if none exists.

(name NormalizedName)

Source from the content-addressed store, hash-verified

397
398// lookup returns the Flag structure of the named flag, returning nil if none exists.
399func (f *FlagSet) lookup(name NormalizedName) *Flag {
400 return f.formal[name]
401}
402
403// func to return a given type for a given flag name
404func (f *FlagSet) getFlagType(name string, ftype string, convFunc func(sval string) (interface{}, error)) (interface{}, error) {

Callers 1

LookupMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected