add int16 flag parser
This commit is contained in:
parent
4e03e59bad
commit
ca6008db64
@ -35,6 +35,11 @@ func (f Flags) Float64(name string) float64 {
|
|||||||
return val
|
return val
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (f Flags) Int16(name string) int16 {
|
||||||
|
val, _ := strconv.ParseInt(f.String(name), 10, 16)
|
||||||
|
return int16(val)
|
||||||
|
}
|
||||||
|
|
||||||
func (f Flags) Bool(name string) bool {
|
func (f Flags) Bool(name string) bool {
|
||||||
val, _ := strconv.ParseBool(f.String(name))
|
val, _ := strconv.ParseBool(f.String(name))
|
||||||
return val
|
return val
|
||||||
|
Loading…
Reference in New Issue
Block a user