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

Method GetInt64

int64.go:30–36  ·  view source on GitHub ↗

GetInt64 return the int64 value of a flag with the given name

(name string)

Source from the content-addressed store, hash-verified

28
29// GetInt64 return the int64 value of a flag with the given name
30func (f *FlagSet) GetInt64(name string) (int64, error) {
31 val, err := f.getFlagType(name, "int64", int64Conv)
32 if err != nil {
33 return 0, err
34 }
35 return val.(int64), nil
36}
37
38// Int64Var defines an int64 flag with specified name, default value, and usage string.
39// The argument p points to an int64 variable in which to store the value of the flag.

Callers 1

testParseFunction · 0.80

Calls 1

getFlagTypeMethod · 0.95

Tested by 1

testParseFunction · 0.64