From 5eb36e65f290318c9b945c65272c4d6f4238e674 Mon Sep 17 00:00:00 2001 From: bergquist Date: Tue, 16 Jan 2018 12:32:42 +0100 Subject: [PATCH] use context over golang.org/x/net/context --- pkg/api/login_oauth.go | 2 +- pkg/metrics/graphitebridge/graphite.go | 3 ++- pkg/plugins/datasource/tsdb/datasource_plugin_wrapper.go | 3 ++- pkg/plugins/datasource/tsdb/grpc.go | 3 ++- pkg/plugins/datasource/tsdb/interface.go | 2 +- pkg/social/social.go | 3 ++- 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/pkg/api/login_oauth.go b/pkg/api/login_oauth.go index b63e3bfd89f..38aff2ac2b4 100644 --- a/pkg/api/login_oauth.go +++ b/pkg/api/login_oauth.go @@ -1,6 +1,7 @@ package api import ( + "context" "crypto/rand" "crypto/tls" "crypto/x509" @@ -11,7 +12,6 @@ import ( "net/http" "net/url" - "golang.org/x/net/context" "golang.org/x/oauth2" "github.com/grafana/grafana/pkg/bus" diff --git a/pkg/metrics/graphitebridge/graphite.go b/pkg/metrics/graphitebridge/graphite.go index 8504a908d9a..68fb544fc7c 100644 --- a/pkg/metrics/graphitebridge/graphite.go +++ b/pkg/metrics/graphitebridge/graphite.go @@ -26,9 +26,10 @@ import ( "strings" "time" + "context" + "github.com/prometheus/common/expfmt" "github.com/prometheus/common/model" - "golang.org/x/net/context" dto "github.com/prometheus/client_model/go" diff --git a/pkg/plugins/datasource/tsdb/datasource_plugin_wrapper.go b/pkg/plugins/datasource/tsdb/datasource_plugin_wrapper.go index e13bfab9cc4..7bc5843dab8 100644 --- a/pkg/plugins/datasource/tsdb/datasource_plugin_wrapper.go +++ b/pkg/plugins/datasource/tsdb/datasource_plugin_wrapper.go @@ -1,13 +1,14 @@ package tsdb import ( + "context" "fmt" + "github.com/grafana/grafana/pkg/components/null" "github.com/grafana/grafana/pkg/log" "github.com/grafana/grafana/pkg/models" "github.com/grafana/grafana/pkg/tsdb" proto "github.com/grafana/grafana/pkg/tsdb/models" - "golang.org/x/net/context" ) func NewDatasourcePluginWrapper(log log.Logger, plugin TsdbPlugin) *DatasourcePluginWrapper { diff --git a/pkg/plugins/datasource/tsdb/grpc.go b/pkg/plugins/datasource/tsdb/grpc.go index c9d696f236e..cc31b398603 100644 --- a/pkg/plugins/datasource/tsdb/grpc.go +++ b/pkg/plugins/datasource/tsdb/grpc.go @@ -1,8 +1,9 @@ package tsdb import ( + "context" + proto "github.com/grafana/grafana/pkg/tsdb/models" - "golang.org/x/net/context" ) type GRPCClient struct { diff --git a/pkg/plugins/datasource/tsdb/interface.go b/pkg/plugins/datasource/tsdb/interface.go index 740718cc4a9..1fd03e703be 100644 --- a/pkg/plugins/datasource/tsdb/interface.go +++ b/pkg/plugins/datasource/tsdb/interface.go @@ -1,7 +1,7 @@ package tsdb import ( - "golang.org/x/net/context" + "context" proto "github.com/grafana/grafana/pkg/tsdb/models" plugin "github.com/hashicorp/go-plugin" diff --git a/pkg/social/social.go b/pkg/social/social.go index d40c0a0c965..8e877ece4f1 100644 --- a/pkg/social/social.go +++ b/pkg/social/social.go @@ -4,7 +4,8 @@ import ( "net/http" "strings" - "golang.org/x/net/context" + "context" + "golang.org/x/oauth2" "github.com/grafana/grafana/pkg/setting"