From e9e5a0c82ac7350b2ce0ed8a8e93e46f00d50222 Mon Sep 17 00:00:00 2001 From: Maxime VISONNEAU Date: Thu, 9 Apr 2020 19:26:57 +0100 Subject: [PATCH] fixed a couple of missed linting errors --- lib/schemas/config.go | 2 +- lib/schemas/config_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/schemas/config.go b/lib/schemas/config.go index 5cff2dd..676339d 100644 --- a/lib/schemas/config.go +++ b/lib/schemas/config.go @@ -94,7 +94,7 @@ func (cfg *Config) ComputeNewVariableExpirations(updatedVariables Variables, exi } // Cleanup maps which could turn out to be empty - for k, _ := range variableExpirations { + for k := range variableExpirations { if len(variableExpirations[k]) == 0 { delete(variableExpirations, k) } diff --git a/lib/schemas/config_test.go b/lib/schemas/config_test.go index c809051..745ca7e 100644 --- a/lib/schemas/config_test.go +++ b/lib/schemas/config_test.go @@ -54,7 +54,7 @@ func TestConfigGetVariableTTL(t *testing.T) { assert.Equal(t, thirtyMinuteDuration, ttl) // With an incorrect value in the variable definition - ttl, err = testConfig.GetVariableTTL(&Variable{TTL: pointy.String("foo")}) + _, err = testConfig.GetVariableTTL(&Variable{TTL: pointy.String("foo")}) assert.Error(t, err) // Using the default configuration value @@ -71,7 +71,7 @@ func TestConfigGetVariableTTL(t *testing.T) { }, } - ttl, err = incorrectDefaultConfig.GetVariableTTL(&Variable{}) + _, err = incorrectDefaultConfig.GetVariableTTL(&Variable{}) assert.Error(t, err) // Without any configuration