Giter Site home page Giter Site logo

Comments (3)

jaronnie avatar jaronnie commented on May 18, 2024 1

go-zero 目前应该是不支持你想要的效果。目前我推荐的方式是这样的。比如一个 user.proto, 一个 role.proto 文件。可以使用多个 goctl 命令进行生成,但是会产生一些多余的 etc 配置文件,多余的 main 文件等。在 shell 脚本中进行删除,并在注册 grpc 服务的地方手动注册进去进行了。如果觉得麻烦,可以考虑 Jzero。一个对 go-zero 的封装,可以一键创建项目,一键生成代码。支持多 proto 分组等特性。项目地址:https://github.com/jaronnie/jzero

from go-zero.

Issues-translate-bot avatar Issues-translate-bot commented on May 18, 2024

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


go-zero currently probably does not support the effect you want. The way I currently recommend is this. For example, a user.proto, a role.proto file. Multiple goctl commands can be used for generation, but some redundant etc configuration files, redundant main files, etc. will be generated. Delete it in the shell script and manually register it where the grpc service is registered. If you find it troublesome, you can consider Jzero. A package of go-zero that can create projects and generate code with one click. Supports features such as multi-proto grouping. Project address: https://github.com/jaronnie/jzero

from go-zero.

kesonan avatar kesonan commented on May 18, 2024

The message of rpc service must be defined in the same proto file as the service. Importing from outside is not supported. Please refer to the documentation https://go-zero.dev/docs/tutorials/cli/rpc#goctl-rpc-protoc

from go-zero.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.