Coder Social home page Coder Social logo

Comments (3)

letmefly avatar letmefly commented on June 11, 2024

按照你目前的工作流程是这样:

  1. git clone https://github.com/henrylee2cn/ant
  2. ant new projA (工程里面反过来又引用了ant的core)
  3. ant run projA (go 编译,运行二进制)
    疑问是api配置文件是时时修改的,需要多次生成go文件,ant new是只一次的,还得添加一个类似 ant gen的命令吧?

我觉得添加了ant命令并没有带来太多好处,反正有点麻烦了。
如果是ant run的话,使用go的IDE就有点麻烦了。
我建议的做法是没有ant命令,直接提供一个可以run的template 工程,要改名自己用个文本编辑器改下就好了,template工程里面提供了api配置文件以及对应的代码生成工具,修改了api直接自己运行下工具生成下代码,最终都是一个没有任何包装的原生go工程,无论用什么IDE都是支持的

from tp-micro.

andeya avatar andeya commented on June 11, 2024

@letmefly

  • 可以把ant new改为ant gen,第一次运行时创建项目,重复gen已存在的项目时更新项目中带有.gen.go后缀的文件
  • ant run是热编译运行命令,它不等于go run

from tp-micro.

letmefly avatar letmefly commented on June 11, 2024

生成的handlers.gen.go代码里面,得有一个默认的handler和router,否则生成代码时,不知道该用什么handler和router。如果把handler写到配置文件里面,显然也是不合理的。

from tp-micro.

Related Issues (3)

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.