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

Method Float64Var

float64.go:40–42  ·  view source on GitHub ↗

Float64Var defines a float64 flag with specified name, default value, and usage string. The argument p points to a float64 variable in which to store the value of the flag.

(p *float64, name string, value float64, usage string)

Source from the content-addressed store, hash-verified

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.
40func (f *FlagSet) Float64Var(p *float64, name string, value float64, usage string) {
41 f.VarP(newFloat64Value(value, p), name, "", usage)
42}
43
44// Float64VarP is like Float64Var, but accepts a shorthand letter that can be used after a single dash.
45func (f *FlagSet) Float64VarP(p *float64, name, shorthand string, value float64, usage string) {

Callers 1

CopyToGoFlagSetMethod · 0.80

Calls 2

VarPMethod · 0.95
newFloat64ValueFunction · 0.85

Tested by

no test coverage detected