Skip to content

Commit d78f3fc

Browse files
authored
deps: Remove direct dependency on golang.org/x/net (#240)
Reference: https://pkg.go.dev/golang.org/x/[email protected]/context Reference: #186 Previously, the module was only using `golang.org/x/net/context` import. That package was deprecated with Go 1.7 when its functionality migrated into the standard library `context` package. This Go module already announces Go 1.17 minimum since version 1.4.4 and the `context` types are not exposed as part of any exported API.
1 parent 930b2bf commit d78f3fc

File tree

12 files changed

+15
-12
lines changed

12 files changed

+15
-12
lines changed

examples/bidirectional/proto/kv.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/bidirectional/shared/grpc.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
package shared
55

66
import (
7+
"context"
8+
79
hclog "github.com/hashicorp/go-hclog"
810
plugin "github.com/hashicorp/go-plugin"
911
"github.com/hashicorp/go-plugin/examples/bidirectional/proto"
10-
"golang.org/x/net/context"
1112
"google.golang.org/grpc"
1213
)
1314

examples/bidirectional/shared/interface.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
package shared
66

77
import (
8-
"golang.org/x/net/context"
8+
"context"
9+
910
"google.golang.org/grpc"
1011

1112
"github.com/hashicorp/go-plugin"

examples/grpc/proto/kv.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/grpc/shared/grpc.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
package shared
55

66
import (
7+
"context"
8+
79
"github.com/hashicorp/go-plugin/examples/grpc/proto"
8-
"golang.org/x/net/context"
910
)
1011

1112
// GRPCClient is an implementation of KV that talks over RPC.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ require (
99
github.com/jhump/protoreflect v1.6.0
1010
github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77
1111
github.com/oklog/run v1.0.0
12-
golang.org/x/net v0.0.0-20190311183353-d8887717615a
1312
google.golang.org/grpc v1.27.1
1413
)
1514

@@ -18,6 +17,7 @@ require (
1817
github.com/mattn/go-colorable v0.1.4 // indirect
1918
github.com/mattn/go-isatty v0.0.10 // indirect
2019
github.com/stretchr/testify v1.3.0 // indirect
20+
golang.org/x/net v0.0.0-20190311183353-d8887717615a // indirect
2121
golang.org/x/sys v0.0.0-20191008105621-543471e840be // indirect
2222
golang.org/x/text v0.3.0 // indirect
2323
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 // indirect

grpc_client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
package plugin
55

66
import (
7+
"context"
78
"crypto/tls"
89
"fmt"
910
"math"
1011
"net"
1112
"time"
1213

1314
"github.com/hashicorp/go-plugin/internal/plugin"
14-
"golang.org/x/net/context"
1515
"google.golang.org/grpc"
1616
"google.golang.org/grpc/credentials"
1717
"google.golang.org/grpc/health/grpc_health_v1"

internal/plugin/grpc_broker.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/plugin/grpc_controller.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/plugin/grpc_stdio.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)