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

Method StringArrayVarP

string_array.go:83–85  ·  view source on GitHub ↗

StringArrayVarP is like StringArrayVar, 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

81
82// StringArrayVarP is like StringArrayVar, but accepts a shorthand letter that can be used after a single dash.
83func (f *FlagSet) StringArrayVarP(p *[]string, name, shorthand string, value []string, usage string) {
84 f.VarP(newStringArrayValue(value, p), name, shorthand, usage)
85}
86
87// StringArrayVar defines a string flag with specified name, default value, and usage string.
88// The argument p points to a []string variable in which to store the value of the flag.

Callers 2

StringArrayMethod · 0.95
StringArrayPMethod · 0.95

Calls 2

VarPMethod · 0.95
newStringArrayValueFunction · 0.85

Tested by

no test coverage detected