From 15e49d6ee6f35b0198502b74e44d75481cb820ca Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Fri, 12 Apr 2024 09:03:21 +0200 Subject: [PATCH] satisfy linter --- cmd/internal/core/reconfigure-switch.go | 2 +- cmd/internal/switcher/sonic/sonic.go | 2 +- cmd/internal/switcher/templates/template_test.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/internal/core/reconfigure-switch.go b/cmd/internal/core/reconfigure-switch.go index d890bd3d..e77491b0 100644 --- a/cmd/internal/core/reconfigure-switch.go +++ b/cmd/internal/core/reconfigure-switch.go @@ -28,7 +28,7 @@ func (r *ReconfigureSwitch) Run() { // Max every 5 Seconds, TODO configurable ? if time.Since(r.lastSync) < 5*time.Second { - r.Core.log.Info("skiping reconfiguration because of last reconfiguration was too recent") + r.Core.log.Info("skipping reconfiguration because of last reconfiguration was too recent") return } diff --git a/cmd/internal/switcher/sonic/sonic.go b/cmd/internal/switcher/sonic/sonic.go index 9fd45ad9..d438c5e9 100644 --- a/cmd/internal/switcher/sonic/sonic.go +++ b/cmd/internal/switcher/sonic/sonic.go @@ -154,7 +154,7 @@ func getPortsConfig(filepath string) (map[string]PortInfo, error) { config := struct { Ports map[string]PortInfo `json:"PORT"` }{} - err = json.Unmarshal(byteValue, &config) + err = json.Unmarshal(byteValue, &config) // nolint:musttag return config.Ports, err } diff --git a/cmd/internal/switcher/templates/template_test.go b/cmd/internal/switcher/templates/template_test.go index 7a43c3d6..c16ed84e 100644 --- a/cmd/internal/switcher/templates/template_test.go +++ b/cmd/internal/switcher/templates/template_test.go @@ -91,7 +91,7 @@ func readConf(t *testing.T, i string) types.Conf { b, err := os.ReadFile(i) require.NoError(t, err, "unexpected error when reading testing input") - err = yaml.Unmarshal(b, &c) + err = yaml.Unmarshal(b, &c) // nolint:musttag require.NoError(t, err, "unexpected error when unmarshalling testing input") return c }