Chore: Fix goimports order in RelEng packages (#62481)

fix goimports order
pull/62087/head^2
Serge Zaitsev 2 years ago committed by GitHub
parent ee3d742c7d
commit 427db55204
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      pkg/build/cmd/buildbackend.go
  2. 3
      pkg/build/cmd/builddocker.go
  3. 3
      pkg/build/cmd/buildfrontend.go
  4. 3
      pkg/build/cmd/buildfrontendpackages.go
  5. 3
      pkg/build/cmd/buildinternalplugins.go
  6. 3
      pkg/build/cmd/e2etests.go
  7. 3
      pkg/build/cmd/enterprisecheck.go
  8. 3
      pkg/build/cmd/exportversion.go
  9. 3
      pkg/build/cmd/fetchimages.go
  10. 1
      pkg/build/cmd/grafanacom.go
  11. 3
      pkg/build/cmd/main.go
  12. 3
      pkg/build/cmd/npm.go
  13. 3
      pkg/build/cmd/package.go
  14. 3
      pkg/build/cmd/publishaws.go
  15. 3
      pkg/build/cmd/publishgithub.go
  16. 3
      pkg/build/cmd/publishimages_enterprise2.go
  17. 3
      pkg/build/cmd/storestorybook.go
  18. 3
      pkg/build/cmd/uploadcdn.go
  19. 3
      pkg/build/cmd/uploadpackages.go
  20. 3
      pkg/build/cmd/uploadpackages_test.go
  21. 2
      pkg/build/cmd/verifydrone.go
  22. 3
      pkg/build/config/genmetadata.go
  23. 3
      pkg/build/droneutil/event_test.go
  24. 4
      pkg/build/env/lookup_test.go
  25. 3
      pkg/build/frontend/config.go
  26. 3
      pkg/build/fsutil/copy_test.go
  27. 3
      pkg/build/fsutil/exists_test.go
  28. 5
      pkg/build/gcloud/storage/gsutil.go
  29. 3
      pkg/build/git/git.go
  30. 3
      pkg/build/git/git_checks_test.go
  31. 3
      pkg/build/git/git_issues_test.go
  32. 3
      pkg/build/git/git_test.go
  33. 3
      pkg/build/metrics/publish.go
  34. 3
      pkg/build/packaging/grafana_test.go
  35. 3
      pkg/build/packaging/rpm_test.go

@ -4,12 +4,13 @@ import (
"fmt" "fmt"
"log" "log"
"github.com/urfave/cli/v2"
"github.com/grafana/grafana/pkg/build/compilers" "github.com/grafana/grafana/pkg/build/compilers"
"github.com/grafana/grafana/pkg/build/config" "github.com/grafana/grafana/pkg/build/config"
"github.com/grafana/grafana/pkg/build/errutil" "github.com/grafana/grafana/pkg/build/errutil"
"github.com/grafana/grafana/pkg/build/grafana" "github.com/grafana/grafana/pkg/build/grafana"
"github.com/grafana/grafana/pkg/build/syncutil" "github.com/grafana/grafana/pkg/build/syncutil"
"github.com/urfave/cli/v2"
) )
func BuildBackend(ctx *cli.Context) error { func BuildBackend(ctx *cli.Context) error {

@ -3,10 +3,11 @@ package main
import ( import (
"log" "log"
"github.com/urfave/cli/v2"
"github.com/grafana/grafana/pkg/build/config" "github.com/grafana/grafana/pkg/build/config"
"github.com/grafana/grafana/pkg/build/docker" "github.com/grafana/grafana/pkg/build/docker"
"github.com/grafana/grafana/pkg/build/gcloud" "github.com/grafana/grafana/pkg/build/gcloud"
"github.com/urfave/cli/v2"
) )
func BuildDocker(c *cli.Context) error { func BuildDocker(c *cli.Context) error {

@ -3,11 +3,12 @@ package main
import ( import (
"log" "log"
"github.com/urfave/cli/v2"
"github.com/grafana/grafana/pkg/build/config" "github.com/grafana/grafana/pkg/build/config"
"github.com/grafana/grafana/pkg/build/errutil" "github.com/grafana/grafana/pkg/build/errutil"
"github.com/grafana/grafana/pkg/build/frontend" "github.com/grafana/grafana/pkg/build/frontend"
"github.com/grafana/grafana/pkg/build/syncutil" "github.com/grafana/grafana/pkg/build/syncutil"
"github.com/urfave/cli/v2"
) )
func BuildFrontend(c *cli.Context) error { func BuildFrontend(c *cli.Context) error {

@ -4,10 +4,11 @@ import (
"log" "log"
"strings" "strings"
"github.com/urfave/cli/v2"
"github.com/grafana/grafana/pkg/build/errutil" "github.com/grafana/grafana/pkg/build/errutil"
"github.com/grafana/grafana/pkg/build/frontend" "github.com/grafana/grafana/pkg/build/frontend"
"github.com/grafana/grafana/pkg/build/syncutil" "github.com/grafana/grafana/pkg/build/syncutil"
"github.com/urfave/cli/v2"
) )
func BuildFrontendPackages(c *cli.Context) error { func BuildFrontendPackages(c *cli.Context) error {

@ -4,11 +4,12 @@ import (
"context" "context"
"log" "log"
"github.com/urfave/cli/v2"
"github.com/grafana/grafana/pkg/build/config" "github.com/grafana/grafana/pkg/build/config"
"github.com/grafana/grafana/pkg/build/errutil" "github.com/grafana/grafana/pkg/build/errutil"
"github.com/grafana/grafana/pkg/build/plugins" "github.com/grafana/grafana/pkg/build/plugins"
"github.com/grafana/grafana/pkg/build/syncutil" "github.com/grafana/grafana/pkg/build/syncutil"
"github.com/urfave/cli/v2"
) )
func BuildInternalPlugins(c *cli.Context) error { func BuildInternalPlugins(c *cli.Context) error {

@ -6,8 +6,9 @@ import (
"os" "os"
"os/exec" "os/exec"
"github.com/grafana/grafana/pkg/build/e2eutil"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
"github.com/grafana/grafana/pkg/build/e2eutil"
) )
func EndToEndTests(c *cli.Context) error { func EndToEndTests(c *cli.Context) error {

@ -6,9 +6,10 @@ import (
"os" "os"
"strconv" "strconv"
"github.com/urfave/cli/v2"
"github.com/grafana/grafana/pkg/build/env" "github.com/grafana/grafana/pkg/build/env"
"github.com/grafana/grafana/pkg/build/git" "github.com/grafana/grafana/pkg/build/git"
"github.com/urfave/cli/v2"
) )
// checkOpts are options used to create a new GitHub check for the enterprise downstream test. // checkOpts are options used to create a new GitHub check for the enterprise downstream test.

@ -4,8 +4,9 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"github.com/grafana/grafana/pkg/build/config"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
"github.com/grafana/grafana/pkg/build/config"
) )
func ExportVersion(c *cli.Context) error { func ExportVersion(c *cli.Context) error {

@ -6,10 +6,11 @@ import (
"os/exec" "os/exec"
"strings" "strings"
"github.com/urfave/cli/v2"
"github.com/grafana/grafana/pkg/build/config" "github.com/grafana/grafana/pkg/build/config"
"github.com/grafana/grafana/pkg/build/docker" "github.com/grafana/grafana/pkg/build/docker"
"github.com/grafana/grafana/pkg/build/gcloud" "github.com/grafana/grafana/pkg/build/gcloud"
"github.com/urfave/cli/v2"
) )
const ( const (

@ -9,7 +9,6 @@ import (
"net/http" "net/http"
"net/url" "net/url"
"os" "os"
"path" "path"
"path/filepath" "path/filepath"
"strings" "strings"

@ -5,8 +5,9 @@ import (
"os" "os"
"strings" "strings"
"github.com/grafana/grafana/pkg/build/docker"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
"github.com/grafana/grafana/pkg/build/docker"
) )
func main() { func main() {

@ -6,8 +6,9 @@ import (
"os/exec" "os/exec"
"strings" "strings"
"github.com/grafana/grafana/pkg/build/npm"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
"github.com/grafana/grafana/pkg/build/npm"
) )
func NpmRetrieveAction(c *cli.Context) error { func NpmRetrieveAction(c *cli.Context) error {

@ -5,11 +5,12 @@ import (
"log" "log"
"strings" "strings"
"github.com/urfave/cli/v2"
"github.com/grafana/grafana/pkg/build/config" "github.com/grafana/grafana/pkg/build/config"
"github.com/grafana/grafana/pkg/build/gpg" "github.com/grafana/grafana/pkg/build/gpg"
"github.com/grafana/grafana/pkg/build/packaging" "github.com/grafana/grafana/pkg/build/packaging"
"github.com/grafana/grafana/pkg/build/syncutil" "github.com/grafana/grafana/pkg/build/syncutil"
"github.com/urfave/cli/v2"
) )
func Package(c *cli.Context) error { func Package(c *cli.Context) error {

@ -17,8 +17,9 @@ import (
"github.com/aws/aws-sdk-go/service/marketplacecatalog" "github.com/aws/aws-sdk-go/service/marketplacecatalog"
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/docker/docker/client" "github.com/docker/docker/client"
"github.com/grafana/grafana/pkg/build/config"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
"github.com/grafana/grafana/pkg/build/config"
) )
const ( const (

@ -9,9 +9,10 @@ import (
"strings" "strings"
"github.com/google/go-github/github" "github.com/google/go-github/github"
"github.com/grafana/grafana/pkg/build/config"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
"golang.org/x/oauth2" "golang.org/x/oauth2"
"github.com/grafana/grafana/pkg/build/config"
) )
type githubRepositoryService interface { type githubRepositoryService interface {

@ -6,10 +6,11 @@ import (
"os" "os"
"os/exec" "os/exec"
"github.com/urfave/cli/v2"
"github.com/grafana/grafana/pkg/build/config" "github.com/grafana/grafana/pkg/build/config"
"github.com/grafana/grafana/pkg/build/docker" "github.com/grafana/grafana/pkg/build/docker"
"github.com/grafana/grafana/pkg/build/gcloud" "github.com/grafana/grafana/pkg/build/gcloud"
"github.com/urfave/cli/v2"
) )
func Enterprise2(c *cli.Context) error { func Enterprise2(c *cli.Context) error {

@ -4,9 +4,10 @@ import (
"log" "log"
"path/filepath" "path/filepath"
"github.com/urfave/cli/v2"
"github.com/grafana/grafana/pkg/build/config" "github.com/grafana/grafana/pkg/build/config"
"github.com/grafana/grafana/pkg/build/gcloud/storage" "github.com/grafana/grafana/pkg/build/gcloud/storage"
"github.com/urfave/cli/v2"
) )
// StoreStorybook implements the sub-command "store-storybook". // StoreStorybook implements the sub-command "store-storybook".

@ -6,9 +6,10 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"github.com/urfave/cli/v2"
"github.com/grafana/grafana/pkg/build/config" "github.com/grafana/grafana/pkg/build/config"
"github.com/grafana/grafana/pkg/build/gcloud/storage" "github.com/grafana/grafana/pkg/build/gcloud/storage"
"github.com/urfave/cli/v2"
) )
// UploadCDN implements the sub-command "upload-cdn". // UploadCDN implements the sub-command "upload-cdn".

@ -9,11 +9,12 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"github.com/urfave/cli/v2"
"github.com/grafana/grafana/pkg/build/config" "github.com/grafana/grafana/pkg/build/config"
"github.com/grafana/grafana/pkg/build/droneutil" "github.com/grafana/grafana/pkg/build/droneutil"
"github.com/grafana/grafana/pkg/build/gcloud" "github.com/grafana/grafana/pkg/build/gcloud"
"github.com/grafana/grafana/pkg/build/packaging" "github.com/grafana/grafana/pkg/build/packaging"
"github.com/urfave/cli/v2"
) )
const releaseFolder = "release" const releaseFolder = "release"

@ -5,9 +5,10 @@ import (
"fmt" "fmt"
"testing" "testing"
"github.com/grafana/grafana/pkg/build/config"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/grafana/grafana/pkg/build/config"
) )
func Test_getVersionFolder(t *testing.T) { func Test_getVersionFolder(t *testing.T) {

@ -10,9 +10,7 @@ import (
"github.com/drone/drone-cli/drone/lint" "github.com/drone/drone-cli/drone/lint"
"github.com/drone/drone-cli/drone/starlark" "github.com/drone/drone-cli/drone/starlark"
"github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp"
cliv1 "github.com/urfave/cli" cliv1 "github.com/urfave/cli"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
"gopkg.in/yaml.v3" "gopkg.in/yaml.v3"

@ -5,8 +5,9 @@ import (
"os" "os"
"strings" "strings"
"github.com/grafana/grafana/pkg/build/droneutil"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
"github.com/grafana/grafana/pkg/build/droneutil"
) )
func GenerateMetadata(c *cli.Context) (Metadata, error) { func GenerateMetadata(c *cli.Context) (Metadata, error) {

@ -3,8 +3,9 @@ package droneutil_test
import ( import (
"testing" "testing"
"github.com/grafana/grafana/pkg/build/droneutil"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/grafana/grafana/pkg/build/droneutil"
) )
func TestGetDroneEvent(t *testing.T) { func TestGetDroneEvent(t *testing.T) {

@ -3,9 +3,9 @@ package env_test
import ( import (
"testing" "testing"
"github.com/grafana/grafana/pkg/build/env"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/grafana/grafana/pkg/build/env"
) )
func TestLookup(t *testing.T) { func TestLookup(t *testing.T) {

@ -1,8 +1,9 @@
package frontend package frontend
import ( import (
"github.com/grafana/grafana/pkg/build/config"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
"github.com/grafana/grafana/pkg/build/config"
) )
const GrafanaDir = "." const GrafanaDir = "."

@ -5,9 +5,10 @@ import (
"runtime" "runtime"
"testing" "testing"
"github.com/grafana/grafana/pkg/build/fsutil"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/grafana/grafana/pkg/build/fsutil"
) )
func TestCopyFile(t *testing.T) { func TestCopyFile(t *testing.T) {

@ -3,8 +3,9 @@ package fsutil_test
import ( import (
"testing" "testing"
"github.com/grafana/grafana/pkg/build/fsutil"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/grafana/grafana/pkg/build/fsutil"
) )
func TestExists_NonExistent(t *testing.T) { func TestExists_NonExistent(t *testing.T) {

@ -16,10 +16,11 @@ import (
"time" "time"
"cloud.google.com/go/storage" "cloud.google.com/go/storage"
"github.com/grafana/grafana/pkg/build/fsutil"
"github.com/grafana/grafana/pkg/build/gcloud"
"google.golang.org/api/iterator" "google.golang.org/api/iterator"
"google.golang.org/api/option" "google.golang.org/api/option"
"github.com/grafana/grafana/pkg/build/fsutil"
"github.com/grafana/grafana/pkg/build/gcloud"
) )
var ( var (

@ -8,8 +8,9 @@ import (
"regexp" "regexp"
"github.com/google/go-github/v45/github" "github.com/google/go-github/v45/github"
"github.com/grafana/grafana/pkg/build/stringutil"
"golang.org/x/oauth2" "golang.org/x/oauth2"
"github.com/grafana/grafana/pkg/build/stringutil"
) )
const ( const (

@ -6,8 +6,9 @@ import (
"testing" "testing"
"github.com/google/go-github/v45/github" "github.com/google/go-github/v45/github"
"github.com/grafana/grafana/pkg/build/git"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/grafana/grafana/pkg/build/git"
) )
type TestChecksService struct { type TestChecksService struct {

@ -6,8 +6,9 @@ import (
"testing" "testing"
"github.com/google/go-github/v45/github" "github.com/google/go-github/v45/github"
"github.com/grafana/grafana/pkg/build/git"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/grafana/grafana/pkg/build/git"
) )
type TestLabelsService struct { type TestLabelsService struct {

@ -3,8 +3,9 @@ package git_test
import ( import (
"testing" "testing"
"github.com/grafana/grafana/pkg/build/git"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/grafana/grafana/pkg/build/git"
) )
func TestPRCheckRegexp(t *testing.T) { func TestPRCheckRegexp(t *testing.T) {

@ -5,10 +5,9 @@ import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"log" "log"
"net/http"
"strconv" "strconv"
"time" "time"
"net/http"
) )
type payload struct { type payload struct {

@ -3,9 +3,10 @@ package packaging_test
import ( import (
"testing" "testing"
"github.com/stretchr/testify/assert"
"github.com/grafana/grafana/pkg/build/config" "github.com/grafana/grafana/pkg/build/config"
"github.com/grafana/grafana/pkg/build/packaging" "github.com/grafana/grafana/pkg/build/packaging"
"github.com/stretchr/testify/assert"
) )
func TestPackageRegexp(t *testing.T) { func TestPackageRegexp(t *testing.T) {

@ -5,8 +5,9 @@ import (
"path/filepath" "path/filepath"
"testing" "testing"
"github.com/grafana/grafana/pkg/build/config"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/grafana/grafana/pkg/build/config"
) )
const pubKey = `-----BEGIN PGP PUBLIC KEY BLOCK----- const pubKey = `-----BEGIN PGP PUBLIC KEY BLOCK-----

Loading…
Cancel
Save