From 084c849fbb6df5bb6aa4ab2a616c2d85775c7944 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Mon, 31 Jan 2022 02:14:36 +0100 Subject: [PATCH] Lint: Fix daedcode / error message Signed-off-by: Knut Ahlers --- config.go | 2 +- helpers.go | 1 - plugins/fieldcollection_test.go | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/config.go b/config.go index cbc1e9d..c0887bd 100644 --- a/config.go +++ b/config.go @@ -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 { diff --git a/helpers.go b/helpers.go index cd7b5b7..3f6c00b 100644 --- a/helpers.go +++ b/helpers.go @@ -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 }("") ) diff --git a/plugins/fieldcollection_test.go b/plugins/fieldcollection_test.go index 05b872a..361af30 100644 --- a/plugins/fieldcollection_test.go +++ b/plugins/fieldcollection_test.go @@ -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") {