Skip to content

Commit

Permalink
gen-hb-grpc use .pb.hb.grpc.go as default suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
hb-chen committed Jan 18, 2020
1 parent 673c419 commit 470c9d9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions protoc-gen-hb-grpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ go get -u github.com/hb-go/grpc-contrib/protoc-gen-hb-grpc
# Registry
protoc --proto_path=.:$GOPATH/src --hb-grpc_out=plugins=registry:. proto/service.proto

# 自定义后缀名,默认.hb.grpc.go
protoc --proto_path=.:$GOPATH/src --hb-grpc_out=plugins=registry,suffix=.hb.grpc.go:. proto/service.proto
```
# 自定义后缀名,默认.pb.grpc.hb.go
protoc --proto_path=.:$GOPATH/src --hb-grpc_out=plugins=registry,suffix=.pb.hb.grpc.go:. proto/service.proto
```
2 changes: 1 addition & 1 deletion protoc-gen-hb-grpc/generator/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ type Plugin interface {
}

var plugins []Plugin
var genFileSuffix = ".hb.grpc.go"
var genFileSuffix = ".pb.hb.grpc.go"

// RegisterPlugin installs a (second-order) plugin to be run when the Go output is generated.
// It is typically called during initialization.
Expand Down
2 changes: 1 addition & 1 deletion protoc-gen-hb-grpc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
// protoc --hb-grpc_out=plugins=registry:output_directory --go_out=output_directory input_directory/file.proto
// to generate hb-grpc code for the protocol defined by file.proto.
// With that input, the output will be written to
// output_directory/file.hb.grpc.go
// output_directory/file.pb.hb.grpc.go
//
// The generated code is documented in the package comment for
// the library.
Expand Down

0 comments on commit 470c9d9

Please sign in to comment.