Skip to content

Commit

Permalink
address review
Browse files Browse the repository at this point in the history
  • Loading branch information
jekiapp committed Sep 17, 2019
1 parent 49d9cf0 commit 60b329d
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 44 deletions.
2 changes: 1 addition & 1 deletion example/simple/client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func main() {
}
defer conn.Close()

c := pb.NewSimpleClient(conn)
c := pb.NewGripmockClient(conn)

// Contact the server and print out its response.
name := "tokopedia"
Expand Down
76 changes: 38 additions & 38 deletions example/simple/simple.pb.go

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

4 changes: 2 additions & 2 deletions example/simple/simple.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ syntax = "proto3";

package simple;

// The greeting service definition.
service Simple {
// The Gripmock service definition.
service Gripmock {
// simple unary method
rpc SayHello (Request) returns (Reply);
}
Expand Down
2 changes: 1 addition & 1 deletion example/simple/stub/simple.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"service":"Simple",
"service":"Gripmock",
"method":"SayHello",
"input":{
"equals":{
Expand Down
2 changes: 1 addition & 1 deletion example/stream/stream.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ syntax = "proto3";

package stream;

// The greeting service definition.
// The Gripmock service definition.
service Gripmock {
// server to client sreaming
rpc serverStream (Request) returns (stream Reply);
Expand Down
3 changes: 3 additions & 0 deletions example/well_known_types/well_known_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@ import "google/protobuf/empty.proto";
import "google/protobuf/api.proto";

service Gripmock {
// this shows us example on using WKT as dependency
// api.proto in particular has go_package alias with semicolon
// "google.golang.org/genproto/protobuf/api;api"
rpc ApiInfo(google.protobuf.Empty) returns (google.protobuf.Api);
}
1 change: 0 additions & 1 deletion protoc-gen-gripmock/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ func resolveDependencies(protos []*descriptor.FileDescriptorProto) map[string]st
aliasNum := 1
for _, dep := range depsFile {
for _, proto := range protos {
pkg := proto.GetOptions().GetGoPackage()
alias, pkg := getGoPackage(proto)

// skip whether its not intended deps
Expand Down

0 comments on commit 60b329d

Please sign in to comment.