Closed samtake closed 5 days ago
已解決,把腳本改成這樣子:
#!/bin/bash
PROTO_NAMES=(
"admin"
"chat"
"common"
)
for name in "${PROTO_NAMES[@]}"; do
# 生成普通的 Go 代码
protoc --go_out=./${name} --go_opt=module=github.com/openimsdk/chat/pkg/protocol/${name} ${name}/${name}.proto
# 生成 gRPC 代码
protoc --go-grpc_out=./${name} --go-grpc_opt=module=github.com/openimsdk/chat/pkg/protocol/${name} ${name}/${name}.proto
done
if [ "$(uname -s)" == "Darwin" ]; then
find . -type f -name '*.pb.go' -exec sed -i '' 's/,omitempty"`/\"\`/g' {} +
else
find . -type f -name '*.pb.go' -exec sed -i 's/,omitempty"`/\"\`/g' {} +
fi
Thank you
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Thank you
What would you like to share?
如下图:我修改了chat.proto文件,想要重新生成对应的相关文件,执行gen脚本报错了,请问正确的操作方式是?
Additional information
No response