Replace "x/net/context" import with "context" (#1138)
* Replace "x/net/context" import with "context"
* go mod tidy
diff --git a/examples/grpc/helloworld_client/main.go b/examples/grpc/helloworld_client/main.go
index 12d8450..e0a3edf 100644
--- a/examples/grpc/helloworld_client/main.go
+++ b/examples/grpc/helloworld_client/main.go
@@ -19,11 +19,11 @@
"os"
"time"
+ "context"
"go.opencensus.io/examples/exporter"
pb "go.opencensus.io/examples/grpc/proto"
"go.opencensus.io/plugin/ocgrpc"
"go.opencensus.io/stats/view"
- "golang.org/x/net/context"
"google.golang.org/grpc"
)
diff --git a/examples/grpc/helloworld_server/main.go b/examples/grpc/helloworld_server/main.go
index c0215a9..5cbe06b 100644
--- a/examples/grpc/helloworld_server/main.go
+++ b/examples/grpc/helloworld_server/main.go
@@ -23,13 +23,13 @@
"net/http"
"time"
+ "context"
"go.opencensus.io/examples/exporter"
pb "go.opencensus.io/examples/grpc/proto"
"go.opencensus.io/plugin/ocgrpc"
"go.opencensus.io/stats/view"
"go.opencensus.io/trace"
"go.opencensus.io/zpages"
- "golang.org/x/net/context"
"google.golang.org/grpc"
)
diff --git a/plugin/ocgrpc/client.go b/plugin/ocgrpc/client.go
index a6c466a..28fddb8 100644
--- a/plugin/ocgrpc/client.go
+++ b/plugin/ocgrpc/client.go
@@ -15,8 +15,8 @@
package ocgrpc
import (
+ "context"
"go.opencensus.io/trace"
- "golang.org/x/net/context"
"google.golang.org/grpc/stats"
)
diff --git a/plugin/ocgrpc/client_stats_handler.go b/plugin/ocgrpc/client_stats_handler.go
index 303c607..18821c7 100644
--- a/plugin/ocgrpc/client_stats_handler.go
+++ b/plugin/ocgrpc/client_stats_handler.go
@@ -18,8 +18,8 @@
import (
"time"
+ "context"
"go.opencensus.io/tag"
- "golang.org/x/net/context"
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/stats"
)
diff --git a/plugin/ocgrpc/client_stats_handler_test.go b/plugin/ocgrpc/client_stats_handler_test.go
index e9197fc..5bf7ef4 100644
--- a/plugin/ocgrpc/client_stats_handler_test.go
+++ b/plugin/ocgrpc/client_stats_handler_test.go
@@ -26,7 +26,7 @@
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
- "golang.org/x/net/context"
+ "context"
"go.opencensus.io/metric/metricdata"
"go.opencensus.io/stats/view"
diff --git a/plugin/ocgrpc/grpc_test.go b/plugin/ocgrpc/grpc_test.go
index 73b0f5c..ab27527 100644
--- a/plugin/ocgrpc/grpc_test.go
+++ b/plugin/ocgrpc/grpc_test.go
@@ -19,8 +19,8 @@
"testing"
"time"
+ "context"
"go.opencensus.io/stats/view"
- "golang.org/x/net/context"
"google.golang.org/grpc/metadata"
"go.opencensus.io/trace"
diff --git a/plugin/ocgrpc/server.go b/plugin/ocgrpc/server.go
index b67b3e2..15ada83 100644
--- a/plugin/ocgrpc/server.go
+++ b/plugin/ocgrpc/server.go
@@ -15,8 +15,8 @@
package ocgrpc
import (
+ "context"
"go.opencensus.io/trace"
- "golang.org/x/net/context"
"google.golang.org/grpc/stats"
)
diff --git a/plugin/ocgrpc/server_stats_handler.go b/plugin/ocgrpc/server_stats_handler.go
index 7847c1a..afcef02 100644
--- a/plugin/ocgrpc/server_stats_handler.go
+++ b/plugin/ocgrpc/server_stats_handler.go
@@ -18,7 +18,7 @@
import (
"time"
- "golang.org/x/net/context"
+ "context"
"go.opencensus.io/tag"
"google.golang.org/grpc/grpclog"
diff --git a/plugin/ocgrpc/server_stats_handler_test.go b/plugin/ocgrpc/server_stats_handler_test.go
index 921155e..bb3ca9a 100644
--- a/plugin/ocgrpc/server_stats_handler_test.go
+++ b/plugin/ocgrpc/server_stats_handler_test.go
@@ -19,8 +19,8 @@
"reflect"
"testing"
+ "context"
"go.opencensus.io/trace"
- "golang.org/x/net/context"
"go.opencensus.io/metric/metricdata"
"go.opencensus.io/stats/view"
diff --git a/plugin/ocgrpc/trace_common.go b/plugin/ocgrpc/trace_common.go
index 720f381..fef5827 100644
--- a/plugin/ocgrpc/trace_common.go
+++ b/plugin/ocgrpc/trace_common.go
@@ -19,9 +19,9 @@
"google.golang.org/grpc/codes"
+ "context"
"go.opencensus.io/trace"
"go.opencensus.io/trace/propagation"
- "golang.org/x/net/context"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/stats"
"google.golang.org/grpc/status"
diff --git a/plugin/ocgrpc/trace_common_test.go b/plugin/ocgrpc/trace_common_test.go
index 9e590d9..2b883b6 100644
--- a/plugin/ocgrpc/trace_common_test.go
+++ b/plugin/ocgrpc/trace_common_test.go
@@ -17,8 +17,8 @@
import (
"testing"
+ "context"
"go.opencensus.io/trace"
- "golang.org/x/net/context"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/stats"
)
diff --git a/plugin/ocgrpc/trace_test.go b/plugin/ocgrpc/trace_test.go
index 7c2243d..f7bd182 100644
--- a/plugin/ocgrpc/trace_test.go
+++ b/plugin/ocgrpc/trace_test.go
@@ -19,9 +19,9 @@
"testing"
"time"
+ "context"
"go.opencensus.io/internal/testpb"
"go.opencensus.io/trace"
- "golang.org/x/net/context"
)
type testExporter struct {
diff --git a/trace/examples_test.go b/trace/examples_test.go
index 41925d6..15f5b79 100644
--- a/trace/examples_test.go
+++ b/trace/examples_test.go
@@ -17,8 +17,8 @@
import (
"fmt"
+ "context"
"go.opencensus.io/trace"
- "golang.org/x/net/context"
)
// This example shows how to use StartSpan and (*Span).End to capture