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

Method StringArrayVar

string_array.go:78–80  ·  view source on GitHub ↗

StringArrayVar defines a string flag with specified name, default value, and usage string. The argument p points to a []string variable in which to store the values of the multiple flags. The value of each argument will not try to be separated by comma. Use a StringSlice for that.

(p *[]string, name string, value []string, usage string)

Source from the content-addressed store, hash-verified

76// The argument p points to a []string variable in which to store the values of the multiple flags.
77// The value of each argument will not try to be separated by comma. Use a StringSlice for that.
78func (f *FlagSet) StringArrayVar(p *[]string, name string, value []string, usage string) {
79 f.VarP(newStringArrayValue(value, p), name, "", usage)
80}
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) {

Callers 2

setUpSAFlagSetFunction · 0.95

Calls 2

VarPMethod · 0.95
newStringArrayValueFunction · 0.85

Tested by 2

setUpSAFlagSetFunction · 0.76