add int16 flag parser

This commit is contained in:
Ryan Cavicchioni 2020-03-28 13:18:15 -05:00
parent 4e03e59bad
commit ca6008db64
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D

View File

@ -35,6 +35,11 @@ func (f Flags) Float64(name string) float64 {
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 {
val, _ := strconv.ParseBool(f.String(name))
return val