Skip to content

Commit

Permalink
protoc-gen-go: use standard library context (requires Go1.9) (#548)
Browse files Browse the repository at this point in the history
This change effectively makes Go1.9 the minimum required version of Go
when using gRPC since type aliases are needed to truly unify context.
Even though this only affects those who use gRPC, there are other reasons we
need Go1.9 (such as type aliases for import public).

Fixes #537
  • Loading branch information
dsnet authored Mar 8, 2018
1 parent 251359b commit 3dc8a89
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 7 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
sudo: false
language: go
go:
- 1.6.x
- 1.7.x
- 1.8.x
- 1.9.x
- 1.10.x
- 1.x
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Google's data interchange format.
Copyright 2010 The Go Authors.
https://github.com/golang/protobuf

This package and the code it generates requires at least Go 1.6.
This package and the code it generates requires at least Go 1.9.

This software implements Go bindings for protocol buffers. For
information about protocol buffers themselves, see
Expand Down
2 changes: 1 addition & 1 deletion protoc-gen-go/grpc/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const generatedCodeVersion = 4
// Paths for packages used by code generated in this file,
// relative to the import_prefix of the generator.Generator.
const (
contextPkgPath = "golang.org/x/net/context"
contextPkgPath = "context"
grpcPkgPath = "google.golang.org/grpc"
)

Expand Down
2 changes: 1 addition & 1 deletion protoc-gen-go/testdata/deprecated/deprecated.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 protoc-gen-go/testdata/grpc/grpc.pb.go

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

0 comments on commit 3dc8a89

Please sign in to comment.