diff options
Diffstat (limited to 'cli/tolerant_pflag.go')
-rw-r--r-- | cli/tolerant_pflag.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cli/tolerant_pflag.go b/cli/tolerant_pflag.go index f2e9f22..b77939c 100644 --- a/cli/tolerant_pflag.go +++ b/cli/tolerant_pflag.go | |||
@@ -17,6 +17,11 @@ type TolerantPflagSet struct { | |||
17 | *pflag.FlagSet | 17 | *pflag.FlagSet |
18 | } | 18 | } |
19 | 19 | ||
20 | func (f *TolerantPflagSet) MayGetInt(n string) int { | ||
21 | v, _ := f.GetInt(n) | ||
22 | return v | ||
23 | } | ||
24 | |||
20 | func (f *TolerantPflagSet) MayGetBool(n string) bool { | 25 | func (f *TolerantPflagSet) MayGetBool(n string) bool { |
21 | v, _ := f.GetBool(n) | 26 | v, _ := f.GetBool(n) |
22 | return v | 27 | return v |