You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
7 years ago | |
|---|---|---|
| .. | ||
| generator | 7 years ago | |
| goparser | 7 years ago | |
| types | 7 years ago | |
| BUILD | 7 years ago | |
| CHANGELOG.md | 7 years ago | |
| CONTRIBUTORS.md | 7 years ago | |
| Makefile | 7 years ago | |
| OWNERS | 7 years ago | |
| README.md | 7 years ago | |
| main.go | 7 years ago | |
| protoc.sh | 7 years ago | |
README.md
warden proto 自动生成工具
protoc.sh
platform/go-common 仓库 pb 文件生成工具
默认使用 gofast, 可以使用 PROTOC_GEN 环境变量指定.
默认 Proto Import Path 为 go-common 目录, go-common/vendor 目录, /usr/local/include 以及proto文件所在目录, 可以通过 PROTO_PATH 环境变量指定.
安装
# 如果你只有一个 GOPATH 的话
ln -s ${GOPATH}/src/go-common/app/tool/warden/protoc.sh /usr/local/bin/protoc.sh && chmod +x /usr/local/bin/protoc.sh
使用方法
> cd {proto 文件所在目录}
> protoc.sh
TODO
- 支持更多系统
- 纠正 pb 文件中错误的 import