mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Linter: fix linter for golangci-lint version v1.45.0 (#47623)
* Update golangci-lint to v1.45.2 Version 1.45.0 added support for Go 1.18: https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md#v1450 Signed-off-by: Marcelo E. Magallon <marcelo.magallon@grafana.com> * Linter: fix some lints issue for golangci-lint version 1.45.2 Co-authored-by: Marcelo E. Magallon <marcelo.magallon@grafana.com> Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
This commit is contained in:
parent
98cbecc4a5
commit
e979690011
@ -553,7 +553,7 @@ func (hs *HTTPServer) PauseAlert(c *models.ReqContext) response.Response {
|
||||
return response.Error(500, "", err)
|
||||
}
|
||||
|
||||
var resp models.AlertStateType = models.AlertStateUnknown
|
||||
resp := models.AlertStateUnknown
|
||||
pausedState := "un-paused"
|
||||
if cmd.Paused {
|
||||
resp = models.AlertStatePaused
|
||||
@ -579,7 +579,7 @@ func (hs *HTTPServer) PauseAllAlerts(c *models.ReqContext) response.Response {
|
||||
return response.Error(500, "Failed to pause alerts", err)
|
||||
}
|
||||
|
||||
var resp models.AlertStateType = models.AlertStatePending
|
||||
resp := models.AlertStatePending
|
||||
pausedState := "un paused"
|
||||
if updateCmd.Paused {
|
||||
resp = models.AlertStatePaused
|
||||
|
@ -29,7 +29,8 @@ import (
|
||||
|
||||
const (
|
||||
InvalidUsernamePassword = "invalid username or password"
|
||||
InvalidAPIKey = "invalid API key"
|
||||
/* #nosec */
|
||||
InvalidAPIKey = "invalid API key"
|
||||
)
|
||||
|
||||
const ServiceName = "ContextHandler"
|
||||
|
@ -49,7 +49,7 @@ func TestReadDashboard(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
|
||||
update := false
|
||||
savedPath := "testdata/" + input + "-info.json"
|
||||
savedPath := filepath.Join("testdata/", input+"-info.json")
|
||||
saved, err := os.ReadFile(savedPath)
|
||||
if err != nil {
|
||||
update = true
|
||||
|
Loading…
Reference in New Issue
Block a user