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

Method StringArrayP

string_array.go:109–113  ·  view source on GitHub ↗

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

(name, shorthand string, value []string, usage string)

Source from the content-addressed store, hash-verified

107
108// StringArrayP is like StringArray, but accepts a shorthand letter that can be used after a single dash.
109func (f *FlagSet) StringArrayP(name, shorthand string, value []string, usage string) *[]string {
110 p := []string{}
111 f.StringArrayVarP(&p, name, shorthand, value, usage)
112 return &p
113}
114
115// StringArray defines a string flag with specified name, default value, and usage string.
116// The return value is the address of a []string variable that stores the value of the flag.

Callers 2

StringArrayFunction · 0.80
StringArrayPFunction · 0.80

Calls 1

StringArrayVarPMethod · 0.95

Tested by

no test coverage detected