Chore: use context rather than golang.org/x/net/context (#114000)

This commit is contained in:
Ryan McKinley
2025-11-17 12:53:44 +03:00
committed by GitHub
parent 9dd8c85448
commit 1ef7c68f53
3 changed files with 48 additions and 5 deletions
+1 -1
View File
@@ -11,7 +11,6 @@ require (
github.com/grafana/grafana/pkg/apimachinery v0.0.0-20250514132646-acbc7b54ed9e
github.com/prometheus/client_golang v1.23.2
github.com/stretchr/testify v1.11.1
golang.org/x/net v0.46.0
k8s.io/apimachinery v0.34.1
k8s.io/apiserver v0.34.1
k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912
@@ -110,6 +109,7 @@ require (
golang.org/x/crypto v0.43.0 // indirect
golang.org/x/exp v0.0.0-20251002181428-27f1f14c8bb9 // indirect
golang.org/x/mod v0.29.0 // indirect
golang.org/x/net v0.46.0 // indirect
golang.org/x/oauth2 v0.32.0 // indirect
golang.org/x/sync v0.17.0 // indirect
golang.org/x/sys v0.37.0 // indirect
@@ -1,9 +1,8 @@
package schemaversion
import (
"context"
"strconv"
"golang.org/x/net/context"
)
const (
@@ -11,7 +10,7 @@ const (
LATEST_VERSION = 42
)
type SchemaVersionMigrationFunc func(context.Context, map[string]interface{}) error
type SchemaVersionMigrationFunc func(context.Context, map[string]any) error
type DataSourceInfo struct {
Default bool
@@ -79,7 +78,7 @@ func GetMigrations(dsIndexProvider DataSourceIndexProvider) map[int]SchemaVersio
}
}
func GetSchemaVersion(dash map[string]interface{}) int {
func GetSchemaVersion(dash map[string]any) int {
if v, ok := dash["schemaVersion"]; ok {
switch v := v.(type) {
case int: