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

Function StringVarP

string.go:52–54  ·  view source on GitHub ↗

StringVarP is like StringVar, but accepts a shorthand letter that can be used after a single dash.

(p *string, name, shorthand string, value string, usage string)

Source from the content-addressed store, hash-verified

50
51// StringVarP is like StringVar, but accepts a shorthand letter that can be used after a single dash.
52func StringVarP(p *string, name, shorthand string, value string, usage string) {
53 CommandLine.VarP(newStringValue(value, p), name, shorthand, usage)
54}
55
56// String defines a string flag with specified name, default value, and usage string.
57// The return value is the address of a string variable that stores the value of the flag.

Callers

nothing calls this directly

Calls 2

newStringValueFunction · 0.85
VarPMethod · 0.80

Tested by

no test coverage detected