build: fix various lint issues

revive default configuration has changed in 1.3.0. Some stuff is a bit
silly (like empty blocks), but I find it easier to follow that than to
try to tweak the configuration.
This commit is contained in:
Vincent Bernat
2023-03-21 00:01:13 +01:00
parent 1408634bad
commit 1ec89aac1f
17 changed files with 41 additions and 53 deletions

View File

@@ -189,9 +189,9 @@ func DefaultHook() (mapstructure.DecodeHookFunc, func()) {
}
}
if to.IsNil() {
new := reflect.New(to.Type().Elem())
method.Func.Call([]reflect.Value{new})
to.Set(new)
newV := reflect.New(to.Type().Elem())
method.Func.Call([]reflect.Value{newV})
to.Set(newV)
return from.Interface(), nil
}
method.Func.Call([]reflect.Value{to})