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

Method Float64

float64.go:62–66  ·  view source on GitHub ↗

Float64 defines a float64 flag with specified name, default value, and usage string. The return value is the address of a float64 variable that stores the value of the flag.

(name string, value float64, usage string)

Source from the content-addressed store, hash-verified

60// Float64 defines a float64 flag with specified name, default value, and usage string.
61// The return value is the address of a float64 variable that stores the value of the flag.
62func (f *FlagSet) Float64(name string, value float64, usage string) *float64 {
63 p := new(float64)
64 f.Float64VarP(p, name, "", value, usage)
65 return p
66}
67
68// Float64P is like Float64, but accepts a shorthand letter that can be used after a single dash.
69func (f *FlagSet) Float64P(name, shorthand string, value float64, usage string) *float64 {

Callers 3

TestPrintDefaultsFunction · 0.95
TestToGoflagsFunction · 0.95
testParseFunction · 0.80

Calls 1

Float64VarPMethod · 0.95

Tested by 3

TestPrintDefaultsFunction · 0.76
TestToGoflagsFunction · 0.76
testParseFunction · 0.64