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

Method GetStringToInt64

string_to_int64.go:91–97  ·  view source on GitHub ↗

GetStringToInt64 return the map[string]int64 value of a flag with the given name

(name string)

Source from the content-addressed store, hash-verified

89
90// GetStringToInt64 return the map[string]int64 value of a flag with the given name
91func (f *FlagSet) GetStringToInt64(name string) (map[string]int64, error) {
92 val, err := f.getFlagType(name, "stringToInt64", stringToInt64Conv)
93 if err != nil {
94 return map[string]int64{}, err
95 }
96 return val.(map[string]int64), nil
97}
98
99// StringToInt64Var defines a string flag with specified name, default value, and usage string.
100// The argument p point64s to a map[string]int64 variable in which to store the values of the multiple flags.

Callers 4

TestEmptyS2I64Function · 0.80
TestS2I64Function · 0.80
TestS2I64DefaultFunction · 0.80
TestS2I64WithDefaultFunction · 0.80

Calls 1

getFlagTypeMethod · 0.95

Tested by 4

TestEmptyS2I64Function · 0.64
TestS2I64Function · 0.64
TestS2I64DefaultFunction · 0.64
TestS2I64WithDefaultFunction · 0.64