-
Notifications
You must be signed in to change notification settings - Fork 812
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix #427 consistent import naming between the import declaration and …
…the vars in grpc * consistent import naming between the import declaration and the vars. This is more consistant with golang/protobuf. * moved issue427 test to the 'testall' make target to avoid grpc/context dependency
- Loading branch information
1 parent
7d68e88
commit 636bf03
Showing
8 changed files
with
47 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.pb.go | ||
*_test.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
test: | ||
go install github.com/gogo/protobuf/protoc-gen-gogo | ||
go install github.com/gogo/protobuf/protoc-min-version | ||
go get -u golang.org/x/net/context | ||
go get -u google.golang.org/grpc | ||
protoc-min-version --version="3.0.0" --gogo_out=plugins=grpc:. --proto_path=../../../../../:../../protobuf/:. issue427.proto | ||
go test ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# The Bug | ||
|
||
Inconsistent package name generation between the import: | ||
|
||
* import golang_org_x_net_context "golang.org/x/net/context" | ||
* import google_golang_org_grpc "google.golang.org/grpc" | ||
|
||
and the dummy vars: | ||
|
||
* var _ context.Context | ||
* var _ grpc.ClientConn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
syntax = "proto3"; | ||
|
||
package issue427; | ||
|
||
import "github.com/gogo/protobuf/gogoproto/gogo.proto"; | ||
|
||
option (gogoproto.testgen_all) = true; | ||
option (gogoproto.populate_all) = true; | ||
option (gogoproto.sizer_all) = true; | ||
option (gogoproto.equal_all) = true; | ||
|
||
message Foo { | ||
string foo = 1; | ||
} | ||
|
||
service Bar { | ||
rpc GetBar (Foo) returns (Foo); | ||
} |