Lint: Fix daedcode / error message

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2022-01-31 02:14:36 +01:00
parent 287a38aa02
commit 084c849fbb
Signed by: luzifer
GPG Key ID: 0066F03ED215AD7D
3 changed files with 2 additions and 3 deletions

View File

@ -96,7 +96,7 @@ func loadConfig(filename string) error {
}
if configVersion.ConfigVersion < expectedMinConfigVersion {
return errors.Errorf("config version too old: %d < %d - Please have a look at the documentation!", configVersion.ConfigVersion, expectedMinConfigVersion)
return errors.Errorf("config version too old: %d < %d - Please have a look at the documentation", configVersion.ConfigVersion, expectedMinConfigVersion)
}
if err = parseConfigFromYAML(filename, tmpConfig, true); err != nil {

View File

@ -2,6 +2,5 @@ package main
var (
ptrBoolFalse = func(v bool) *bool { return &v }(false)
ptrIntZero = func(v int64) *int64 { return &v }(0)
ptrStringEmpty = func(v string) *string { return &v }("")
)

View File

@ -80,7 +80,7 @@ func TestFieldCollectionNilDataGet(t *testing.T) {
}
func TestFieldCollectionIntToString(t *testing.T) {
var val int = 123
val := 123
fc := FieldCollectionFromData(map[string]interface{}{"test": val})
if !fc.CanString("test") {