Chore: Upgrade Go to 1.19.2 (#56857)
We also need to upgrade the linter together with the Go version, all the changes should relate to either fixing linting problems or upgrading the Go version used to build Grafana.
This commit is contained in:
+2
-2
@@ -553,7 +553,7 @@ func (hs *HTTPServer) PauseAlert(c *models.ReqContext) response.Response {
|
||||
return response.Error(500, "", err)
|
||||
}
|
||||
|
||||
var resp models.AlertStateType = models.AlertStateUnknown
|
||||
var 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
|
||||
var resp = models.AlertStatePending
|
||||
pausedState := "un paused"
|
||||
if updateCmd.Paused {
|
||||
resp = models.AlertStatePaused
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"io/ioutil" //nolint:staticcheck // No need to change in v8.
|
||||
"net/http"
|
||||
"net/url"
|
||||
"path/filepath"
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io/ioutil" //nolint:staticcheck // No need to change in v8.
|
||||
"net/http"
|
||||
"testing"
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"encoding/json"
|
||||
"flag"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io/ioutil" //nolint:staticcheck // No need to change in v8.
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
@@ -84,6 +84,7 @@ func mergeSpecs(output string, sources ...string) error {
|
||||
return fmt.Errorf("failed to intend new spec: %w", err)
|
||||
}
|
||||
|
||||
//nolint:gosec
|
||||
f, err = os.Create(output)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to create file for new spec: %w", err)
|
||||
|
||||
@@ -2,7 +2,7 @@ package api
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"io/ioutil"
|
||||
"io/ioutil" //nolint:staticcheck // No need to change in v8.
|
||||
"net/url"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package frontendlogging
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"io/ioutil" //nolint:staticcheck // No need to change in v8.
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"io/ioutil" //nolint:staticcheck // No need to change in v8.
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"strings"
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io/ioutil" //nolint:staticcheck // No need to change in v8.
|
||||
"net/http"
|
||||
"testing"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ package api
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io/ioutil"
|
||||
"io/ioutil" //nolint:staticcheck // No need to change in v8.
|
||||
"net/http"
|
||||
"testing"
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io/ioutil" //nolint:staticcheck // No need to change in v8.
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strconv"
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io/ioutil" //nolint:staticcheck // No need to change in v8.
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"net/url"
|
||||
|
||||
@@ -3,7 +3,7 @@ package pluginproxy
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"io/ioutil" //nolint:staticcheck // No need to change in v8.
|
||||
"net/http"
|
||||
"net/http/httputil"
|
||||
"net/url"
|
||||
|
||||
@@ -2,7 +2,7 @@ package pluginproxy
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io/ioutil"
|
||||
"io/ioutil" //nolint:staticcheck // No need to change in v8.
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
@@ -3,7 +3,7 @@ package pluginproxy
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io/ioutil" //nolint:staticcheck // No need to change in v8.
|
||||
"net/http"
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"io/ioutil" //nolint:staticcheck // No need to change in v8.
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"io/ioutil" //nolint:staticcheck // No need to change in v8.
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"os"
|
||||
|
||||
Reference in New Issue
Block a user