Comments (3)
按照你目前的工作流程是这样:
- git clone https://github.com/henrylee2cn/ant
- ant new projA (工程里面反过来又引用了ant的core)
- 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.
- 可以把
ant new
改为ant gen
,第一次运行时创建项目,重复gen已存在的项目时更新项目中带有.gen.go
后缀的文件 ant run
是热编译运行命令,它不等于go run
from tp-micro.
生成的handlers.gen.go代码里面,得有一个默认的handler和router,否则生成代码时,不知道该用什么handler和router。如果把handler写到配置文件里面,显然也是不合理的。
from tp-micro.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tp-micro.