GetFloat32Slice return the []float32 value of a flag with the given name
(name string)
| 118 | |
| 119 | // GetFloat32Slice return the []float32 value of a flag with the given name |
| 120 | func (f *FlagSet) GetFloat32Slice(name string) ([]float32, error) { |
| 121 | val, err := f.getFlagType(name, "float32Slice", float32SliceConv) |
| 122 | if err != nil { |
| 123 | return []float32{}, err |
| 124 | } |
| 125 | return val.([]float32), nil |
| 126 | } |
| 127 | |
| 128 | // Float32SliceVar defines a float32Slice flag with specified name, default value, and usage string. |
| 129 | // The argument p points to a []float32 variable in which to store the value of the flag. |