GetUint16 return the uint16 value of a flag with the given name
(name string)
| 32 | |
| 33 | // GetUint16 return the uint16 value of a flag with the given name |
| 34 | func (f *FlagSet) GetUint16(name string) (uint16, error) { |
| 35 | val, err := f.getFlagType(name, "uint16", uint16Conv) |
| 36 | if err != nil { |
| 37 | return 0, err |
| 38 | } |
| 39 | return val.(uint16), nil |
| 40 | } |
| 41 | |
| 42 | // Uint16Var defines a uint flag with specified name, default value, and usage string. |
| 43 | // The argument p points to a uint variable in which to store the value of the flag. |