mirror of
https://github.com/grafana/grafana.git
synced 2026-09-05 04:40:13 -05:00
Upgrade golangci-lint and fixes some linting errors. (#22909)
Example: https://play.golang.org/p/cfPIPG3BwjJ
This commit is contained in:
@@ -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")
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user