mirror of
				https://github.com/grafana/grafana.git
				synced 2025-02-25 18:55:37 -06:00 
			
		
		
		
	Chore: Fix goimports grouping (#62427)
* fix goimports order * fix goimports order
This commit is contained in:
		@@ -10,8 +10,8 @@ import (
 | 
			
		||||
	"github.com/grafana/grafana-azure-sdk-go/azsettings"
 | 
			
		||||
	"github.com/grafana/grafana-plugin-sdk-go/backend"
 | 
			
		||||
	sdkhttpclient "github.com/grafana/grafana-plugin-sdk-go/backend/httpclient"
 | 
			
		||||
	"github.com/grafana/grafana/pkg/tsdb/prometheus/utils"
 | 
			
		||||
 | 
			
		||||
	"github.com/grafana/grafana/pkg/tsdb/prometheus/utils"
 | 
			
		||||
	"github.com/grafana/grafana/pkg/util/maputil"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -6,10 +6,10 @@ import (
 | 
			
		||||
	"github.com/grafana/grafana-azure-sdk-go/azsettings"
 | 
			
		||||
	"github.com/grafana/grafana-plugin-sdk-go/backend"
 | 
			
		||||
	sdkhttpclient "github.com/grafana/grafana-plugin-sdk-go/backend/httpclient"
 | 
			
		||||
 | 
			
		||||
	"github.com/grafana/grafana/pkg/setting"
 | 
			
		||||
	"github.com/stretchr/testify/assert"
 | 
			
		||||
	"github.com/stretchr/testify/require"
 | 
			
		||||
 | 
			
		||||
	"github.com/grafana/grafana/pkg/setting"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestConfigureAzureAuthentication(t *testing.T) {
 | 
			
		||||
 
 | 
			
		||||
@@ -12,6 +12,7 @@ import (
 | 
			
		||||
	"time"
 | 
			
		||||
 | 
			
		||||
	"github.com/grafana/grafana-plugin-sdk-go/backend"
 | 
			
		||||
 | 
			
		||||
	"github.com/grafana/grafana/pkg/tsdb/prometheus/models"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -8,9 +8,10 @@ import (
 | 
			
		||||
	"time"
 | 
			
		||||
 | 
			
		||||
	"github.com/grafana/grafana-plugin-sdk-go/backend"
 | 
			
		||||
	"github.com/stretchr/testify/require"
 | 
			
		||||
 | 
			
		||||
	"github.com/grafana/grafana/pkg/cmd/grafana-cli/logger"
 | 
			
		||||
	"github.com/grafana/grafana/pkg/tsdb/prometheus/models"
 | 
			
		||||
	"github.com/stretchr/testify/require"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type MockDoer struct {
 | 
			
		||||
 
 | 
			
		||||
@@ -6,6 +6,7 @@ import (
 | 
			
		||||
 | 
			
		||||
	"github.com/grafana/grafana-plugin-sdk-go/backend"
 | 
			
		||||
	sdkhttpclient "github.com/grafana/grafana-plugin-sdk-go/backend/httpclient"
 | 
			
		||||
 | 
			
		||||
	"github.com/grafana/grafana/pkg/infra/log"
 | 
			
		||||
	"github.com/grafana/grafana/pkg/setting"
 | 
			
		||||
	"github.com/grafana/grafana/pkg/tsdb/prometheus/azureauth"
 | 
			
		||||
 
 | 
			
		||||
@@ -5,9 +5,10 @@ import (
 | 
			
		||||
 | 
			
		||||
	"github.com/grafana/grafana-azure-sdk-go/azsettings"
 | 
			
		||||
	"github.com/grafana/grafana-plugin-sdk-go/backend"
 | 
			
		||||
	"github.com/stretchr/testify/require"
 | 
			
		||||
 | 
			
		||||
	"github.com/grafana/grafana/pkg/infra/log/logtest"
 | 
			
		||||
	"github.com/grafana/grafana/pkg/setting"
 | 
			
		||||
	"github.com/stretchr/testify/require"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestCreateTransportOptions(t *testing.T) {
 | 
			
		||||
 
 | 
			
		||||
@@ -5,6 +5,7 @@ import (
 | 
			
		||||
	"net/url"
 | 
			
		||||
 | 
			
		||||
	sdkhttpclient "github.com/grafana/grafana-plugin-sdk-go/backend/httpclient"
 | 
			
		||||
 | 
			
		||||
	"github.com/grafana/grafana/pkg/infra/log"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -7,8 +7,9 @@ import (
 | 
			
		||||
	"testing"
 | 
			
		||||
 | 
			
		||||
	"github.com/grafana/grafana-plugin-sdk-go/backend/httpclient"
 | 
			
		||||
	"github.com/grafana/grafana/pkg/infra/log"
 | 
			
		||||
	"github.com/stretchr/testify/require"
 | 
			
		||||
 | 
			
		||||
	"github.com/grafana/grafana/pkg/infra/log"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestCustomQueryParametersMiddleware(t *testing.T) {
 | 
			
		||||
 
 | 
			
		||||
@@ -4,6 +4,7 @@ import (
 | 
			
		||||
	"net/http"
 | 
			
		||||
 | 
			
		||||
	sdkhttpclient "github.com/grafana/grafana-plugin-sdk-go/backend/httpclient"
 | 
			
		||||
 | 
			
		||||
	"github.com/grafana/grafana/pkg/infra/log"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -5,8 +5,9 @@ import (
 | 
			
		||||
	"testing"
 | 
			
		||||
 | 
			
		||||
	"github.com/grafana/grafana-plugin-sdk-go/backend/httpclient"
 | 
			
		||||
	"github.com/grafana/grafana/pkg/infra/log"
 | 
			
		||||
	"github.com/stretchr/testify/require"
 | 
			
		||||
 | 
			
		||||
	"github.com/grafana/grafana/pkg/infra/log"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestEnsureHttpMethodMiddleware(t *testing.T) {
 | 
			
		||||
 
 | 
			
		||||
@@ -8,6 +8,7 @@ import (
 | 
			
		||||
	"time"
 | 
			
		||||
 | 
			
		||||
	"github.com/grafana/grafana-plugin-sdk-go/backend"
 | 
			
		||||
 | 
			
		||||
	"github.com/grafana/grafana/pkg/tsdb/intervalv2"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -6,9 +6,10 @@ import (
 | 
			
		||||
	"time"
 | 
			
		||||
 | 
			
		||||
	"github.com/grafana/grafana-plugin-sdk-go/backend"
 | 
			
		||||
	"github.com/stretchr/testify/require"
 | 
			
		||||
 | 
			
		||||
	"github.com/grafana/grafana/pkg/tsdb/intervalv2"
 | 
			
		||||
	"github.com/grafana/grafana/pkg/tsdb/prometheus/models"
 | 
			
		||||
	"github.com/stretchr/testify/require"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
var (
 | 
			
		||||
 
 | 
			
		||||
@@ -10,6 +10,9 @@ import (
 | 
			
		||||
	"github.com/grafana/grafana-plugin-sdk-go/backend"
 | 
			
		||||
	"github.com/grafana/grafana-plugin-sdk-go/backend/datasource"
 | 
			
		||||
	"github.com/grafana/grafana-plugin-sdk-go/backend/instancemgmt"
 | 
			
		||||
	"github.com/patrickmn/go-cache"
 | 
			
		||||
	apiv1 "github.com/prometheus/client_golang/api/prometheus/v1"
 | 
			
		||||
 | 
			
		||||
	"github.com/grafana/grafana/pkg/infra/httpclient"
 | 
			
		||||
	"github.com/grafana/grafana/pkg/infra/log"
 | 
			
		||||
	"github.com/grafana/grafana/pkg/infra/tracing"
 | 
			
		||||
@@ -18,8 +21,6 @@ import (
 | 
			
		||||
	"github.com/grafana/grafana/pkg/tsdb/prometheus/client"
 | 
			
		||||
	"github.com/grafana/grafana/pkg/tsdb/prometheus/querydata"
 | 
			
		||||
	"github.com/grafana/grafana/pkg/tsdb/prometheus/resource"
 | 
			
		||||
	"github.com/patrickmn/go-cache"
 | 
			
		||||
	apiv1 "github.com/prometheus/client_golang/api/prometheus/v1"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
var plog = log.New("tsdb.prometheus")
 | 
			
		||||
 
 | 
			
		||||
@@ -10,10 +10,11 @@ import (
 | 
			
		||||
	"github.com/grafana/grafana-plugin-sdk-go/backend"
 | 
			
		||||
	"github.com/grafana/grafana-plugin-sdk-go/backend/datasource"
 | 
			
		||||
	sdkHttpClient "github.com/grafana/grafana-plugin-sdk-go/backend/httpclient"
 | 
			
		||||
	"github.com/stretchr/testify/require"
 | 
			
		||||
 | 
			
		||||
	"github.com/grafana/grafana/pkg/infra/httpclient"
 | 
			
		||||
	"github.com/grafana/grafana/pkg/services/featuremgmt"
 | 
			
		||||
	"github.com/grafana/grafana/pkg/setting"
 | 
			
		||||
	"github.com/stretchr/testify/require"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type fakeSender struct{}
 | 
			
		||||
 
 | 
			
		||||
@@ -5,6 +5,7 @@ import (
 | 
			
		||||
	"time"
 | 
			
		||||
 | 
			
		||||
	"github.com/grafana/grafana-plugin-sdk-go/experimental"
 | 
			
		||||
 | 
			
		||||
	"github.com/grafana/grafana/pkg/tsdb/prometheus/models"
 | 
			
		||||
	"github.com/grafana/grafana/pkg/tsdb/prometheus/querydata/exemplar"
 | 
			
		||||
)
 | 
			
		||||
 
 | 
			
		||||
@@ -5,6 +5,7 @@ import (
 | 
			
		||||
	"time"
 | 
			
		||||
 | 
			
		||||
	"github.com/grafana/grafana-plugin-sdk-go/experimental"
 | 
			
		||||
 | 
			
		||||
	"github.com/grafana/grafana/pkg/tsdb/prometheus/models"
 | 
			
		||||
	"github.com/grafana/grafana/pkg/tsdb/prometheus/querydata/exemplar"
 | 
			
		||||
)
 | 
			
		||||
 
 | 
			
		||||
@@ -15,8 +15,9 @@ import (
 | 
			
		||||
	"time"
 | 
			
		||||
 | 
			
		||||
	"github.com/grafana/grafana-plugin-sdk-go/backend"
 | 
			
		||||
	"github.com/grafana/grafana/pkg/tsdb/prometheus/models"
 | 
			
		||||
	"github.com/stretchr/testify/require"
 | 
			
		||||
 | 
			
		||||
	"github.com/grafana/grafana/pkg/tsdb/prometheus/models"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// when memory-profiling this benchmark, these commands are recommended:
 | 
			
		||||
 
 | 
			
		||||
@@ -12,10 +12,9 @@ import (
 | 
			
		||||
	"testing"
 | 
			
		||||
	"time"
 | 
			
		||||
 | 
			
		||||
	"github.com/stretchr/testify/require"
 | 
			
		||||
 | 
			
		||||
	"github.com/grafana/grafana-plugin-sdk-go/backend"
 | 
			
		||||
	"github.com/grafana/grafana-plugin-sdk-go/experimental"
 | 
			
		||||
	"github.com/stretchr/testify/require"
 | 
			
		||||
 | 
			
		||||
	"github.com/grafana/grafana/pkg/tsdb/prometheus/models"
 | 
			
		||||
)
 | 
			
		||||
 
 | 
			
		||||
@@ -13,7 +13,6 @@ import (
 | 
			
		||||
	"github.com/grafana/grafana-plugin-sdk-go/backend"
 | 
			
		||||
	sdkhttpclient "github.com/grafana/grafana-plugin-sdk-go/backend/httpclient"
 | 
			
		||||
	"github.com/grafana/grafana-plugin-sdk-go/data"
 | 
			
		||||
	"github.com/grafana/grafana/pkg/tsdb/prometheus/client"
 | 
			
		||||
	apiv1 "github.com/prometheus/client_golang/api/prometheus/v1"
 | 
			
		||||
	p "github.com/prometheus/common/model"
 | 
			
		||||
	"github.com/stretchr/testify/require"
 | 
			
		||||
@@ -22,6 +21,7 @@ import (
 | 
			
		||||
	"github.com/grafana/grafana/pkg/infra/log/logtest"
 | 
			
		||||
	"github.com/grafana/grafana/pkg/infra/tracing"
 | 
			
		||||
	"github.com/grafana/grafana/pkg/setting"
 | 
			
		||||
	"github.com/grafana/grafana/pkg/tsdb/prometheus/client"
 | 
			
		||||
	"github.com/grafana/grafana/pkg/tsdb/prometheus/models"
 | 
			
		||||
	"github.com/grafana/grafana/pkg/tsdb/prometheus/querydata"
 | 
			
		||||
)
 | 
			
		||||
 
 | 
			
		||||
@@ -6,8 +6,9 @@ import (
 | 
			
		||||
	"fmt"
 | 
			
		||||
 | 
			
		||||
	"github.com/grafana/grafana-plugin-sdk-go/backend"
 | 
			
		||||
	"github.com/grafana/grafana/pkg/infra/tracing"
 | 
			
		||||
	"go.opentelemetry.io/otel/attribute"
 | 
			
		||||
 | 
			
		||||
	"github.com/grafana/grafana/pkg/infra/tracing"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// GetJsonData just gets the json in easier to work with type. It's used on multiple places which isn't super effective
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user