1. 安装protobuf:https://github.com/protocolbuffers/protobuf/releases
go install github.com/golang/protobuf/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
go install golang.org/x/tools/cmd/stringer@latest
- 5.1 build生成工具
cd chaos/template
go build -o protoc-gen-gin.exe
-
5.2 将protoc-gen-gin.exe拷贝至go_path的bin目录下
-
5.3 protoc命令
protoc --proto_path=. --proto_path=../third_party --go_out=./test --go-grpc_out=./test --gin_out=./test test.proto
- 6.1 build生成工具
cd chaos/cmd/chaos-codegen
go build -o chaos-codegen.exe
- 6.2 chaos-codegen.exe拷贝至go_path的bin目录下