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

Function StringArray

string_array.go:118–120  ·  view source on GitHub ↗

StringArray defines a string flag with specified name, default value, and usage string. The return value is the address of a []string variable that stores the value of the flag. The value of each argument will not try to be separated by comma. Use a StringSlice for that.

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

Source from the content-addressed store, hash-verified

116// The return value is the address of a []string variable that stores the value of the flag.
117// The value of each argument will not try to be separated by comma. Use a StringSlice for that.
118func StringArray(name string, value []string, usage string) *[]string {
119 return CommandLine.StringArrayP(name, "", value, usage)
120}
121
122// StringArrayP is like StringArray, but accepts a shorthand letter that can be used after a single dash.
123func StringArrayP(name, shorthand string, value []string, usage string) *[]string {

Callers

nothing calls this directly

Calls 1

StringArrayPMethod · 0.80

Tested by

no test coverage detected