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

Function ShorthandLookup

flag.go:481–483  ·  view source on GitHub ↗

ShorthandLookup returns the Flag structure of the short handed flag, returning nil if none exists.

(name string)

Source from the content-addressed store, hash-verified

479// ShorthandLookup returns the Flag structure of the short handed flag,
480// returning nil if none exists.
481func ShorthandLookup(name string) *Flag {
482 return CommandLine.ShorthandLookup(name)
483}
484
485// Set sets the value of the named flag.
486func (f *FlagSet) Set(name, value string) error {

Callers 1

ExampleShorthandLookupFunction · 0.92

Calls 1

ShorthandLookupMethod · 0.80

Tested by 1

ExampleShorthandLookupFunction · 0.74