Upgrade golangci-lint and fixes some linting errors. (#22909)

Example: https://play.golang.org/p/cfPIPG3BwjJ
This commit is contained in:
Carl Bergquist
2020-03-23 13:37:53 +01:00
committed by GitHub
parent c82a778c3d
commit 3798ac903d
17 changed files with 131 additions and 41 deletions
+1 -2
View File
@@ -1,7 +1,6 @@
package cloudwatch
import (
"fmt"
"os"
"testing"
@@ -25,7 +24,7 @@ func TestECSCredProvider(t *testing.T) {
So(ecsProvider, ShouldNotBeNil)
So(ok, ShouldBeTrue)
So(ecsProvider.Client.Endpoint, ShouldEqual, fmt.Sprintf("http://169.254.170.2/abc/123"))
So(ecsProvider.Client.Endpoint, ShouldEqual, "http://169.254.170.2/abc/123")
})
}
+1 -5
View File
@@ -56,11 +56,7 @@ func (e *CloudWatchExecutor) transformQueryResponseToQueryResult(cloudwatchRespo
responsesByRefID := make(map[string][]*cloudwatchResponse)
for _, res := range cloudwatchResponses {
if _, ok := responsesByRefID[res.RefId]; ok {
responsesByRefID[res.RefId] = append(responsesByRefID[res.RefId], res)
} else {
responsesByRefID[res.RefId] = []*cloudwatchResponse{res}
}
responsesByRefID[res.RefId] = append(responsesByRefID[res.RefId], res)
}
for refID, responses := range responsesByRefID {