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

Function StringArrayVar

string_array.go:90–92  ·  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 value of the flag. 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

88// The argument p points to a []string variable in which to store the value of the flag.
89// The value of each argument will not try to be separated by comma. Use a StringSlice for that.
90func StringArrayVar(p *[]string, name string, value []string, usage string) {
91 CommandLine.VarP(newStringArrayValue(value, p), name, "", usage)
92}
93
94// StringArrayVarP is like StringArrayVar, but accepts a shorthand letter that can be used after a single dash.
95func StringArrayVarP(p *[]string, name, shorthand string, value []string, usage string) {

Callers

nothing calls this directly

Calls 2

newStringArrayValueFunction · 0.85
VarPMethod · 0.80

Tested by

no test coverage detected