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

Method GetFloat64

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

GetFloat64 return the float64 value of a flag with the given name

(name string)

Source from the content-addressed store, hash-verified

28
29// GetFloat64 return the float64 value of a flag with the given name
30func (f *FlagSet) GetFloat64(name string) (float64, error) {
31 val, err := f.getFlagType(name, "float64", float64Conv)
32 if err != nil {
33 return 0, err
34 }
35 return val.(float64), nil
36}
37
38// Float64Var defines a float64 flag with specified name, default value, and usage string.
39// The argument p points to a float64 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