Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace "golang.org/x/net/context" with "context" and stop supporting go1.6 #1160

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: go

go:
- 1.6.3
- 1.7
- 1.8

Expand Down
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"
"google.golang.org/grpc"
pb "google.golang.org/grpc/examples/helloworld/helloworld"
+ "google.golang.org/grpc/reflection"
Expand Down
2 changes: 1 addition & 1 deletion balancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
package grpc

import (
"context"
"fmt"
"sync"

"golang.org/x/net/context"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/grpclog"
Expand Down
2 changes: 1 addition & 1 deletion balancer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
package grpc

import (
"context"
"fmt"
"math"
"sync"
"testing"
"time"

"golang.org/x/net/context"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/naming"
)
Expand Down
2 changes: 1 addition & 1 deletion benchmark/benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ Package benchmark implements the building blocks to setup end-to-end gRPC benchm
package benchmark

import (
"context"
"fmt"
"io"
"net"

"golang.org/x/net/context"
"google.golang.org/grpc"
testpb "google.golang.org/grpc/benchmark/grpc_testing"
"google.golang.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
@@ -1,12 +1,12 @@
package benchmark

import (
"context"
"os"
"sync"
"testing"
"time"

"golang.org/x/net/context"
"google.golang.org/grpc"
testpb "google.golang.org/grpc/benchmark/grpc_testing"
"google.golang.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
@@ -1,6 +1,7 @@
package main

import (
"context"
"flag"
"math"
"net"
Expand All @@ -9,7 +10,6 @@ import (
"sync"
"time"

"golang.org/x/net/context"
"google.golang.org/grpc"
"google.golang.org/grpc/benchmark"
testpb "google.golang.org/grpc/benchmark/grpc_testing"
Expand Down
3 changes: 2 additions & 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 @@ -34,12 +34,12 @@
package main

import (
"context"
"math"
"runtime"
"sync"
"time"

"golang.org/x/net/context"
"google.golang.org/grpc"
"google.golang.org/grpc/benchmark"
testpb "google.golang.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 @@ -34,6 +34,7 @@
package main

import (
"context"
"flag"
"fmt"
"io"
Expand All @@ -42,7 +43,6 @@ import (
"strconv"
"time"

"golang.org/x/net/context"
"google.golang.org/grpc"
testpb "google.golang.org/grpc/benchmark/grpc_testing"
"google.golang.org/grpc/codes"
Expand Down
2 changes: 1 addition & 1 deletion call.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ package grpc

import (
"bytes"
"context"
"io"
"time"

"golang.org/x/net/context"
"golang.org/x/net/trace"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/peer"
Expand Down
2 changes: 1 addition & 1 deletion call_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
package grpc

import (
"context"
"fmt"
"io"
"math"
Expand All @@ -44,7 +45,6 @@ import (
"testing"
"time"

"golang.org/x/net/context"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/transport"
)
Expand Down
2 changes: 1 addition & 1 deletion clientconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@
package grpc

import (
"context"
"errors"
"fmt"
"math"
"net"
"sync"
"time"

"golang.org/x/net/context"
"golang.org/x/net/trace"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/grpclog"
Expand Down
3 changes: 1 addition & 2 deletions clientconn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,11 @@
package grpc

import (
"context"
"net"
"testing"
"time"

"golang.org/x/net/context"

"google.golang.org/grpc/credentials"
)

Expand Down
3 changes: 1 addition & 2 deletions credentials/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,14 @@
package credentials // import "google.golang.org/grpc/credentials"

import (
"context"
"crypto/tls"
"crypto/x509"
"errors"
"fmt"
"io/ioutil"
"net"
"strings"

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

var (
Expand Down
3 changes: 1 addition & 2 deletions credentials/credentials_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@
package credentials

import (
"context"
"crypto/tls"
"net"
"testing"

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

func TestTLSOverrideServerName(t *testing.T) {
Expand Down
72 changes: 0 additions & 72 deletions credentials/credentials_util_pre_go17.go

This file was deleted.

2 changes: 1 addition & 1 deletion credentials/oauth/oauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
package oauth

import (
"context"
"fmt"
"io/ioutil"

"golang.org/x/net/context"
"golang.org/x/oauth2"
"golang.org/x/oauth2/google"
"golang.org/x/oauth2/jwt"
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 @@ -34,10 +34,10 @@
package main

import (
"context"
"log"
"os"

"golang.org/x/net/context"
"google.golang.org/grpc"
pb "google.golang.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 @@ -34,10 +34,10 @@
package main

import (
"context"
"log"
"net"

"golang.org/x/net/context"
"google.golang.org/grpc"
pb "google.golang.org/grpc/examples/helloworld/helloworld"
"google.golang.org/grpc/reflection"
Expand Down
3 changes: 2 additions & 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/helloworld/mock/hw_test.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package mock_test

import (
"context"
"fmt"
"testing"

"github.com/golang/mock/gomock"
"github.com/golang/protobuf/proto"
"golang.org/x/net/context"
helloworld "google.golang.org/grpc/examples/helloworld/helloworld"
hwmock "google.golang.org/grpc/examples/helloworld/mock/mock_helloworld"
)
Expand Down
3 changes: 2 additions & 1 deletion examples/helloworld/mock/mock_helloworld/hw_mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
package mock_helloworld

import (
context "context"

gomock "github.com/golang/mock/gomock"
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
helloworld "google.golang.org/grpc/examples/helloworld/helloworld"
)
Expand Down
2 changes: 1 addition & 1 deletion examples/route_guide/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@
package main

import (
"context"
"flag"
"io"
"math/rand"
"time"

"golang.org/x/net/context"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
pb "google.golang.org/grpc/examples/route_guide/routeguide"
Expand Down
3 changes: 2 additions & 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 @@ -38,6 +38,7 @@
package main

import (
"context"
"encoding/json"
"flag"
"fmt"
Expand All @@ -47,7 +48,6 @@ import (
"net"
"time"

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

"google.golang.org/grpc/credentials"
Expand Down
Loading