[BUGFIX] Sometimes not listening to the linter is the best idea you do

This commit is contained in:
Elia el Lazkani 2020-02-29 12:50:37 +01:00
parent 939ec82312
commit 49b983b5fb

View file

@ -131,8 +131,8 @@ func generateParamFormat() (string, bool, error) {
return "?format=3", downloadMode, nil
}
for i := range switches {
if *switches[i] {
for i, s := range switches {
if *s {
params.WriteString(switchesFlags[i])
}
}
@ -166,7 +166,7 @@ var (
location = app.Flag("location", "Specify explicite location (--expert-mode)").Short('L').OverrideDefaultFromEnvar("GO_CMW_LOCATION").String()
language = app.Flag("language", "Specify explicite language (--expert-mode)").Short('l').OverrideDefaultFromEnvar("GO_CMW_LANGUAGE").String()
v2 = app.Flag("v2", "Display Data-Rich output").Default("false").Bool()
switches = [13]*bool{
switches = []*bool{
app.Flag("metric", "Display weather in metric").Short('m').Default("false").Bool(),
app.Flag("uscs", "Display weather in imperial").Short('u').Default("false").Bool(),
app.Flag("meter-second", "Display wind in m/s").Short('M').Default("false").Bool(),