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:
Emil Tullstedt
2022-10-13 14:53:51 +02:00
committed by GitHub
parent 9e70696f09
commit 656e270bd9
152 changed files with 377 additions and 347 deletions
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"io/ioutil" //nolint:staticcheck // No need to change in v8.
"net/http"
"testing"
+2 -1
View File
@@ -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)
+1 -1
View File
@@ -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 -1
View File
@@ -1,7 +1,7 @@
package frontendlogging
import (
"io/ioutil"
"io/ioutil" //nolint:staticcheck // No need to change in v8.
"net/http"
"net/url"
"os"
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"io/ioutil" //nolint:staticcheck // No need to change in v8.
"net/http"
"testing"
+1 -1
View File
@@ -2,7 +2,7 @@ package api
import (
"context"
"io/ioutil"
"io/ioutil" //nolint:staticcheck // No need to change in v8.
"net/http"
"testing"
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -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
View File
@@ -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"
+1 -1
View File
@@ -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"