https://github.com/goapt/protoc-gen-go-wire
protoc generate golang wire type alias
https://github.com/goapt/protoc-gen-go-wire
Last synced: about 2 months ago
JSON representation
protoc generate golang wire type alias
- Host: GitHub
- URL: https://github.com/goapt/protoc-gen-go-wire
- Owner: goapt
- Created: 2021-08-03T15:54:58.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-08-12T09:28:41.000Z (almost 4 years ago)
- Last Synced: 2024-06-20T22:33:13.066Z (11 months ago)
- Language: Go
- Size: 20.5 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# protoc-gen-go-wire
从 protobuf 文件中生成wire依赖注入的变量别名
## 安装请确保安装了以下依赖:
- [go 1.16](https://golang.org/dl/)
- [protoc](https://github.com/protocolbuffers/protobuf)
- [protoc-gen-go](https://github.com/protocolbuffers/protobuf-go)```bash
go install github.com/goapt/protoc-gen-go-wire@latest
```### 文件生成
```bash
protoc --proto_path=. \
--proto_path=./third_party \
--go_out=paths=source_relative:. \
--go-http_out=paths=source_relative:. \
--go-grpc_out=paths=source_relative,require_unimplemented_servers=false:. \
--go-wire_out=paths=source_relative:. \
./example/test.proto
```