Skip to content

Commit

Permalink
Use std context instead of golang.org/x/net/context.
Browse files Browse the repository at this point in the history
  • Loading branch information
bradfitz committed May 17, 2017
1 parent a2c8171 commit 32ab3eb
Show file tree
Hide file tree
Showing 52 changed files with 62 additions and 62 deletions.
2 changes: 1 addition & 1 deletion Documentation/server-reflection-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ For example, to enable server reflection in `example/helloworld`, we need to mak
--- a/examples/helloworld/greeter_server/main.go
+++ b/examples/helloworld/greeter_server/main.go
@@ -40,6 +40,7 @@ import (
"golang.org/x/net/context"
"context"
"go4.org/grpc"
pb "go4.org/grpc/examples/helloworld/helloworld"
+ "go4.org/grpc/reflection"
Expand Down
2 changes: 1 addition & 1 deletion benchmark/benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import (
"io"
"net"

"golang.org/x/net/context"
"context"
"go4.org/grpc"
testpb "go4.org/grpc/benchmark/grpc_testing"
"go4.org/grpc/grpclog"
Expand Down
2 changes: 1 addition & 1 deletion benchmark/benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"
"time"

"golang.org/x/net/context"
"context"
"go4.org/grpc"
testpb "go4.org/grpc/benchmark/grpc_testing"
"go4.org/grpc/benchmark/stats"
Expand Down
2 changes: 1 addition & 1 deletion benchmark/client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"sync"
"time"

"golang.org/x/net/context"
"context"
"go4.org/grpc"
"go4.org/grpc/benchmark"
testpb "go4.org/grpc/benchmark/grpc_testing"
Expand Down
2 changes: 1 addition & 1 deletion benchmark/grpc_testing/services.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 benchmark/worker/benchmark_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import (
"sync"
"time"

"golang.org/x/net/context"
"context"
"go4.org/grpc"
"go4.org/grpc/benchmark"
testpb "go4.org/grpc/benchmark/grpc_testing"
Expand Down
2 changes: 1 addition & 1 deletion benchmark/worker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import (
"strconv"
"time"

"golang.org/x/net/context"
"context"
"go4.org/grpc"
testpb "go4.org/grpc/benchmark/grpc_testing"
"go4.org/grpc/codes"
Expand Down
4 changes: 2 additions & 2 deletions call.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ import (
"strings"
"time"

"golang.org/x/net/context"
"golang.org/x/net/trace"
"context"
"go4.org/grpc/codes"
"go4.org/grpc/metadata"
"go4.org/grpc/stats"
"golang.org/x/net/trace"
)

// Invoke sends a non-streaming RPC request on the wire and returns
Expand Down
2 changes: 1 addition & 1 deletion call_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import (
"testing"
"time"

"golang.org/x/net/context"
"context"
"go4.org/grpc/codes"
"go4.org/grpc/transport"
)
Expand Down
2 changes: 1 addition & 1 deletion clientconn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
"testing"
"time"

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

"go4.org/grpc/credentials"
)
Expand Down
2 changes: 1 addition & 1 deletion credentials/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import (
"net"
"strings"

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

var (
Expand Down
2 changes: 1 addition & 1 deletion credentials/credentials_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
"net"
"testing"

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

func TestTLSOverrideServerName(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions credentials/oauth/oauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ import (
"fmt"
"io/ioutil"

"golang.org/x/net/context"
"context"
"go4.org/grpc/credentials"
"golang.org/x/oauth2"
"golang.org/x/oauth2/google"
"golang.org/x/oauth2/jwt"
"go4.org/grpc/credentials"
)

// TokenSource supplies PerRPCCredentials from an oauth2.TokenSource.
Expand Down
2 changes: 1 addition & 1 deletion examples/helloworld/greeter_client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
"log"
"os"

"golang.org/x/net/context"
"context"
"go4.org/grpc"
pb "go4.org/grpc/examples/helloworld/helloworld"
)
Expand Down
2 changes: 1 addition & 1 deletion examples/helloworld/greeter_server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
"log"
"net"

"golang.org/x/net/context"
"context"
"go4.org/grpc"
pb "go4.org/grpc/examples/helloworld/helloworld"
"go4.org/grpc/reflection"
Expand Down
2 changes: 1 addition & 1 deletion examples/helloworld/helloworld/helloworld.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 examples/route_guide/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import (
"math/rand"
"time"

"golang.org/x/net/context"
"context"
"go4.org/grpc"
"go4.org/grpc/credentials"
pb "go4.org/grpc/examples/route_guide/routeguide"
Expand Down
2 changes: 1 addition & 1 deletion examples/route_guide/routeguide/route_guide.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 examples/route_guide/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import (
"net"
"time"

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

"go4.org/grpc/credentials"
Expand Down
2 changes: 1 addition & 1 deletion grpclb/grpc_lb_v1/grpclb.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 grpclb/grpclb.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import (
"sync"
"time"

"golang.org/x/net/context"
"context"
"go4.org/grpc"
"go4.org/grpc/codes"
lbpb "go4.org/grpc/grpclb/grpc_lb_v1"
Expand Down
2 changes: 1 addition & 1 deletion grpclb/grpclb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import (
"testing"
"time"

"golang.org/x/net/context"
"context"
"go4.org/grpc"
"go4.org/grpc/codes"
"go4.org/grpc/credentials"
Expand Down
2 changes: 1 addition & 1 deletion health/grpc_health_v1/health.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 health/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package health
import (
"sync"

"golang.org/x/net/context"
"context"
"go4.org/grpc"
"go4.org/grpc/codes"
healthpb "go4.org/grpc/health/grpc_health_v1"
Expand Down
2 changes: 1 addition & 1 deletion interceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
package grpc

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

// Streamer is called by StreamClientInterceptor to create a ClientStream.
Expand Down
2 changes: 1 addition & 1 deletion interop/grpc_testing/test.pb.go

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

6 changes: 3 additions & 3 deletions interop/test_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ import (
"strings"
"time"

"context"
"github.com/golang/protobuf/proto"
"golang.org/x/net/context"
"golang.org/x/oauth2"
"golang.org/x/oauth2/google"
"go4.org/grpc"
"go4.org/grpc/codes"
"go4.org/grpc/grpclog"
testpb "go4.org/grpc/interop/grpc_testing"
"go4.org/grpc/metadata"
"golang.org/x/oauth2"
"golang.org/x/oauth2/google"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion metadata/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import (
"fmt"
"strings"

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

const (
Expand Down
2 changes: 1 addition & 1 deletion peer/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ package peer
import (
"net"

"golang.org/x/net/context"
"context"
"go4.org/grpc/credentials"
)

Expand Down
2 changes: 1 addition & 1 deletion reflection/grpc_reflection_v1alpha/reflection.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 reflection/grpc_testing/test.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 reflection/serverreflection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ import (
"sort"
"testing"

"context"
"github.com/golang/protobuf/proto"
dpb "github.com/golang/protobuf/protoc-gen-go/descriptor"
"golang.org/x/net/context"
"go4.org/grpc"
rpb "go4.org/grpc/reflection/grpc_reflection_v1alpha"
pb "go4.org/grpc/reflection/grpc_testing"
Expand Down
2 changes: 1 addition & 1 deletion rpc_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ import (
"os"
"time"

"context"
"github.com/golang/protobuf/proto"
"golang.org/x/net/context"
"go4.org/grpc/codes"
"go4.org/grpc/metadata"
"go4.org/grpc/stats"
Expand Down
2 changes: 1 addition & 1 deletion rpc_util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ import (
"reflect"
"testing"

"context"
"github.com/golang/protobuf/proto"
"golang.org/x/net/context"
"go4.org/grpc/codes"
perfpb "go4.org/grpc/test/codec_perf"
"go4.org/grpc/transport"
Expand Down
6 changes: 3 additions & 3 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ import (
"sync"
"time"

"golang.org/x/net/context"
"golang.org/x/net/http2"
"golang.org/x/net/trace"
"context"
"go4.org/grpc/codes"
"go4.org/grpc/credentials"
"go4.org/grpc/grpclog"
Expand All @@ -57,6 +55,8 @@ import (
"go4.org/grpc/stats"
"go4.org/grpc/tap"
"go4.org/grpc/transport"
"golang.org/x/net/http2"
"golang.org/x/net/trace"
)

type methodHandler func(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor UnaryServerInterceptor) (interface{}, error)
Expand Down
2 changes: 1 addition & 1 deletion stats/grpc_testing/test.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 stats/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ package stats
import (
"net"

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

// ConnTagInfo defines the relevant information needed by connection context tagger.
Expand Down
2 changes: 1 addition & 1 deletion stats/stats_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ import (
"testing"
"time"

"context"
"github.com/golang/protobuf/proto"
"golang.org/x/net/context"
"go4.org/grpc"
"go4.org/grpc/metadata"
"go4.org/grpc/stats"
Expand Down
4 changes: 2 additions & 2 deletions stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ import (
"sync"
"time"

"golang.org/x/net/context"
"golang.org/x/net/trace"
"context"
"go4.org/grpc/codes"
"go4.org/grpc/metadata"
"go4.org/grpc/stats"
"go4.org/grpc/transport"
"golang.org/x/net/trace"
)

// StreamHandler defines the handler called by gRPC server to complete the
Expand Down
Loading

0 comments on commit 32ab3eb

Please sign in to comment.