实时重新加载go应用
简介
1、可以实现go代码的 live-reload
2、基于 fresh 不在维护,开发了 air
特点
- Colorful log output
- Customize build or binary command
- Support excluding subdirectories
- Allow watching new directories after Air started
- Better building process
安装
go get -u github.com/cosmtrek/air
使用
air
输出:
1、因为我本地没有开启MySQL服务,所以有链接报错。
2、air 会检测其他文件的改动,一旦其他文件改动之后,会自动进行编译
3、air 和生产环境的热部署无关。
本作品采用《CC 协议》,转载必须注明作者和本文链接