We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
上次我提了一个dao层复用的问题,今天又遇到一个基础类型的protoc如何复用的问题: shopAdmin protoc: message goods{...} shopFront protoc: message goods{...} 这两个protoc都有goods这个基础的类型,如何做才能比较优美的实现复用?
The text was updated successfully, but these errors were encountered:
一般来说,proto 这一层是不鼓励复用的。这些 message 看起来挺像,但不同的接口对字段的要求是不一样的。即便开始的时候一样,后台也可能出现分化。所以我们这边都是不复用的。
如果真想复用,可以搞一个 rpc/common/xxx.proto,把公共的写义写在这里,再利用 proto 的 import 语法导入。
rpc/common/xxx.proto
Sorry, something went wrong.
No branches or pull requests
上次我提了一个dao层复用的问题,今天又遇到一个基础类型的protoc如何复用的问题:
shopAdmin protoc:
message goods{...}
shopFront protoc:
message goods{...}
这两个protoc都有goods这个基础的类型,如何做才能比较优美的实现复用?
The text was updated successfully, but these errors were encountered: