Skip to content

Commit

Permalink
Replace "x/net/context" import with "context" (#810)
Browse files Browse the repository at this point in the history
  • Loading branch information
marselester authored and peterbourgon committed Dec 7, 2018
1 parent e0e1b24 commit f688401
Show file tree
Hide file tree
Showing 6 changed files with 234 additions and 126 deletions.
211 changes: 145 additions & 66 deletions examples/addsvc/pb/addsvc.pb.go

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

5 changes: 2 additions & 3 deletions examples/addsvc/pkg/addtransport/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
stdopentracing "github.com/opentracing/opentracing-go"
stdzipkin "github.com/openzipkin/zipkin-go"
"github.com/sony/gobreaker"
oldcontext "golang.org/x/net/context"
"golang.org/x/time/rate"

"github.com/go-kit/kit/circuitbreaker"
Expand Down Expand Up @@ -65,15 +64,15 @@ func NewGRPCServer(endpoints addendpoint.Set, otTracer stdopentracing.Tracer, zi
}
}

func (s *grpcServer) Sum(ctx oldcontext.Context, req *pb.SumRequest) (*pb.SumReply, error) {
func (s *grpcServer) Sum(ctx context.Context, req *pb.SumRequest) (*pb.SumReply, error) {
_, rep, err := s.sum.ServeGRPC(ctx, req)
if err != nil {
return nil, err
}
return rep.(*pb.SumReply), nil
}

func (s *grpcServer) Concat(ctx oldcontext.Context, req *pb.ConcatRequest) (*pb.ConcatReply, error) {
func (s *grpcServer) Concat(ctx context.Context, req *pb.ConcatRequest) (*pb.ConcatReply, error) {
_, rep, err := s.concat.ServeGRPC(ctx, req)
if err != nil {
return nil, err
Expand Down
3 changes: 1 addition & 2 deletions sd/etcd/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import (
"reflect"
"testing"
"time"

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

etcd "go.etcd.io/etcd/client"
)
Expand Down
Loading

0 comments on commit f688401

Please sign in to comment.