feat: Support for multiple rpc service generation and rpc grouping (#1972)
* Add group & compatible flag * Add group & compatible flag * Support for multiple rpc service generation and rpc grouping * Support for multiple rpc service generation and rpc grouping * Format code * Format code * Add comments * Fix unit test * Refactor function name * Add example & Update grpc readme * go mod tidy * update mod * update mod
This commit is contained in:
22
tools/goctl/example/rpc/single_rpc_service_generate.sh
Normal file
22
tools/goctl/example/rpc/single_rpc_service_generate.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
wd=$(pwd)
|
||||
output="$wd/hello"
|
||||
|
||||
rm -rf $output
|
||||
|
||||
goctl rpc protoc -I $wd "$wd/hello.proto" --go_out="$output/pb" --go-grpc_out="$output/pb" --zrpc_out="$output" --multiple
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Generate failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
GOPROXY="https://goproxy.cn,direct" && go mod tidy
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Tidy failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
go test ./...
|
||||
Reference in New Issue
Block a user