Skip to content

Commit

Permalink
deps: Remove direct dependency on golang.org/x/net
Browse files Browse the repository at this point in the history
Reference: https://pkg.go.dev/golang.org/x/net@v0.0.0-20190311183353-d8887717615a/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.
  • Loading branch information
bflad committed Mar 3, 2023
1 parent b60690f commit 6063e7a
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion examples/bidirectional/proto/kv.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion examples/bidirectional/shared/grpc.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package shared

import (
"context"

hclog "github.com/hashicorp/go-hclog"
plugin "github.com/hashicorp/go-plugin"
"github.com/hashicorp/go-plugin/examples/bidirectional/proto"
"golang.org/x/net/context"
"google.golang.org/grpc"
)

Expand Down
3 changes: 2 additions & 1 deletion examples/bidirectional/shared/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
package shared

import (
"golang.org/x/net/context"
"context"

"google.golang.org/grpc"

"github.com/hashicorp/go-plugin"
Expand Down
2 changes: 1 addition & 1 deletion examples/grpc/proto/kv.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion examples/grpc/shared/grpc.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package shared

import (
"context"

"github.com/hashicorp/go-plugin/examples/grpc/proto"
"golang.org/x/net/context"
)

// GRPCClient is an implementation of KV that talks over RPC.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ require (
github.com/jhump/protoreflect v1.6.0
github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77
github.com/oklog/run v1.0.0
golang.org/x/net v0.0.0-20190311183353-d8887717615a
google.golang.org/grpc v1.27.1
)

Expand All @@ -18,6 +17,7 @@ require (
github.com/mattn/go-colorable v0.1.4 // indirect
github.com/mattn/go-isatty v0.0.10 // indirect
github.com/stretchr/testify v1.3.0 // indirect
golang.org/x/net v0.0.0-20190311183353-d8887717615a // indirect
golang.org/x/sys v0.0.0-20191008105621-543471e840be // indirect
golang.org/x/text v0.3.0 // indirect
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 // indirect
Expand Down
2 changes: 1 addition & 1 deletion grpc_client.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package plugin

import (
"context"
"crypto/tls"
"fmt"
"math"
"net"
"time"

"github.com/hashicorp/go-plugin/internal/plugin"
"golang.org/x/net/context"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/health/grpc_health_v1"
Expand Down
2 changes: 1 addition & 1 deletion internal/plugin/grpc_broker.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/plugin/grpc_controller.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/plugin/grpc_stdio.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugin_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package plugin

import (
"context"
"crypto/tls"
"crypto/x509"
"errors"
Expand All @@ -17,7 +18,6 @@ import (
"github.com/golang/protobuf/ptypes/empty"
hclog "github.com/hashicorp/go-hclog"
grpctest "github.com/hashicorp/go-plugin/test/grpc"
"golang.org/x/net/context"
"google.golang.org/grpc"
)

Expand Down
2 changes: 1 addition & 1 deletion test/grpc/test.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6063e7a

Please sign in to comment.