MCPcopy
hub / github.com/grpc-ecosystem/grpc-gateway / StringArrayFlag

Function StringArrayFlag

utilities/string_array_flag.go:15–19  ·  utilities/string_array_flag.go::StringArrayFlag

StringArrayFlag defines a flag with the specified name and usage string. The return value is the address of a `StringArrayFlags` variable that stores the repeated values of the flag.

(f flagInterface, name string, usage string)

Source from the content-addressed store, hash-verified

13// StringArrayFlag defines a flag with the specified name and usage string.
14// The return value is the address of a `StringArrayFlags` variable that stores the repeated values of the flag.
15func StringArrayFlag(f flagInterface, name string, usage string) *StringArrayFlags {
16 value := &StringArrayFlags{}
17 f.Var(value, name, usage)
18 return value
19}
20
21// StringArrayFlags is a wrapper of `[]string` to provider an interface for `flag.Var`
22type StringArrayFlags []string

Callers 2

main.goFile · 0.92
TestStringArrayFlagFunction · 0.92

Calls 1

VarMethod · 0.80

Tested by 1

TestStringArrayFlagFunction · 0.74