GetFloat64 return the float64 value of a flag with the given name
(name string)
| 28 | |
| 29 | // GetFloat64 return the float64 value of a flag with the given name |
| 30 | func (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. |