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.
 
爱折腾的小码农 2c7e72c5f8
添加make自动生成
11 months ago
discovery 解决两个包冲突问题 11 months ago
user 解决两个包冲突问题 11 months ago
LICENSE Initial commit 3 years ago
Makefile 添加make自动生成 11 months ago
README.md 添加包生成命令 11 months ago
discovery.proto 添加服务发现 11 months ago
go.mod 1 11 months ago
go.sum update readme 12 months ago
users.pb.go Init 3 years ago
users.proto 添加服务发现 11 months ago

README.md

example-proto

Provide proto for goravel/example

# 1. Install Protocol Tools

- [protoc@libprotoc](https://grpc.io/docs/protoc-installation/): Generate proto files.
  - check the version by `protoc --version`
- [protoc-gen-go](https://grpc.io/docs/languages/go/quickstart/#prerequisites): Generate go files from proto files.
  - `go install google.golang.org/protobuf/cmd/protoc-gen-go@latest`
  - check the version by `protoc-gen-go --version`
- [protoc-gen-go-grpc](https://grpc.io/docs/languages/go/quickstart/#prerequisites): Generate go grpc files from proto 
  files.
  - `go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest`
  - check the version by `protoc-gen-go-grpc --version`

# 2. Generate proto files
protoc --go_out=. --go-grpc_out=. *.proto

protoc --proto_path=. --go_out=discovery --go_opt=paths=source_relative --go-grpc_out=discovery --go-grpc_opt=paths=source_relative discovery.proto
protoc --proto_path=. --go_out=user --go_opt=paths=source_relative --go-grpc_out=user --go-grpc_opt=paths=source_relative users.proto