jason 904c787940 change | il y a 1 an | |
---|---|---|
.. | ||
v1 | il y a 1 an | |
ReadMe.md | il y a 3 ans | |
common_service.pb.go | il y a 1 an | |
common_service.proto | il y a 1 an | |
device_service.pb.go | il y a 1 an | |
device_service.proto | il y a 1 an | |
garden_service.pb.go | il y a 1 an | |
garden_service.proto | il y a 1 an | |
household_service.pb.go | il y a 2 ans | |
household_service.proto | il y a 2 ans | |
setup.go | il y a 1 an | |
system_service.pb.go | il y a 2 ans | |
system_service.proto | il y a 2 ans | |
thirdparty_service.pb.go | il y a 1 an | |
thirdparty_service.proto | il y a 1 an |
下载与安装protoc
工具
安装protoc Go插件:protoc-gen-go
方式1(默认带omitempty
):
go get -u github.com/golang/protobuf/protoc-gen-go
方式2(不带omitempty
):
cd mod /github.com/golang/protobuf@v1.3.4/protoc-gen-go/generator
go build
cp protoc-gen-go $GOBIN/