File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ import (
12
12
13
13
type arg struct {
14
14
cliShort , cliLong , cfgFileEnvVar , description string
15
- isBool , defaultIfBool bool
16
15
}
17
16
18
17
var (
@@ -158,8 +157,6 @@ var (
158
157
}
159
158
startCompactArg = arg {
160
159
cliLong : "compact-header" ,
161
- isBool : true ,
162
- defaultIfBool : false ,
163
160
cfgFileEnvVar : "wander_compact_header" ,
164
161
description : `If "true", start with compact header. Default "false"` ,
165
162
}
@@ -225,11 +222,7 @@ func init() {
225
222
startAllTasksView ,
226
223
compactTablesArg ,
227
224
} {
228
- if c .isBool {
229
- rootCmd .PersistentFlags ().BoolP (c .cliLong , c .cliShort , c .defaultIfBool , c .description )
230
- } else {
231
- rootCmd .PersistentFlags ().StringP (c .cliLong , c .cliShort , "" , c .description )
232
- }
225
+ rootCmd .PersistentFlags ().StringP (c .cliLong , c .cliShort , "" , c .description )
233
226
viper .BindPFlag (c .cliLong , rootCmd .PersistentFlags ().Lookup (c .cfgFileEnvVar ))
234
227
}
235
228
You can’t perform that action at this time.
0 commit comments