强烈推荐beego中的bee工具 也可仿照其源码写一个
我平时用的iris 用的都是bee run 生产环境建议go build运行
其次最近一直在使用gowatching 类似bee工具,bee工具好像是不能脱离gopath
码云
go get github.com/beego/bee
go get github.com/silenceper/gowatch
gowatch 项目名(常用这种方式在开发环境gowa 按tab键就能补全直接跑)
Bee is a Fast and Flexible tool for managing your Beego Web Application.
Usage:
bee command [arguments]
The commands are:
version show the bee & beego version
migrate run database migrations
api create an api application base on beego framework
bale packs non-Go files to Go source files
new create an application base on beego framework
run run the app which can hot compile
pack compress an beego project
fix Fixes your application by making it compatible with newer versions of Beego
dlv Start