golang热编译工具|golang热编译工具 Hotbuild
hotbuild
A cross platform hot compilation tool
By monitoring the modification of the project directory file, the recompilation and running are automatically triggered. Running directory and monitoring change directory can be different. Monitor the file modification in all recursive subdirectories under the project path.
文章图片
Install
go get -u github.com/wandercn/hotbuild@latest
Initialize
wander$ cd $your_project_dir/
wander$ hotbuild initconf
2021/07/28 11:10:03 create config file: .hotbuild.toml
Run
wander$ cd $your_project_dir/
wander$ hotbuild run
_____ ___________ ___ _____
| | | |/ _ \__| | __ )| | | |_ _| ||_ \
| |_| | | | || ||_ \| | | || || || | | |
|_| |_| || || |_) | |_| || || |___| |_| |
|_| |_|\___/ |_||____/ \___/|___|_____|____/ v1.0.5, built with Go 1.16.5.............................. ( Start rebuilding ) .................................
.............................. [ Build successfully ] ...............................
.............................. { Start running } ....................................
2021/07/06 09:56:26.913 [I] [asm_amd64.s:1371]http server Running on http://0.0.0.0:8080
2021/07/06 09:56:26.913 [I] [asm_amd64.s:1371]Admin server Running on :8088
Custom configuration Auto create default configuration file in $your_project_dir/.hotbuild.toml,you can modify the configuration yourself.
wander$ cd $your_project_dir/
wander$ cat .hotbuild.toml
buildcmd = "go build -o ./tmp_bin"
excludedir = [".git", "tmp", "docs", "vendor"]
projectdir = "/Users/apple/workspace/src/example.com/"
runcmd = "./tmp_bin"
en | zh-cn | |
---|---|---|
buildcmd | Compile command | 编译命令 |
excludedir | Exclude tracked folders | 排除跟踪的文件夹 |
projectdir | Project directory to track | 需要跟踪的项目目录 |
runcmd | Run command | 运行命令 |
- the "Too many open files" error of MacOSX
# maxfiles is 256 too small.wander$ launchctl limit cpuunlimitedunlimited filesizeunlimitedunlimited dataunlimitedunlimited stack838860867104768 core0unlimited rssunlimitedunlimited memlockunlimitedunlimited maxproc27844176 maxfiles25610240# change maxfiles to 4096.wander$ sudo launchctl limit maxfiles 4096 unlimited wander$ launchctl limit cpuunlimitedunlimited filesizeunlimitedunlimited dataunlimitedunlimited stack838860867104768 core0unlimited rssunlimitedunlimited memlockunlimitedunlimited maxproc27844176 maxfiles409610240
推荐阅读
- 热闹中的孤独
- 2018年6月7日|2018年6月7日 日记
- 我那水深火热的二婚生活
- 热爱的东西就得坚持哦
- 惊奇于世界,还热爱于生活
- 热闹也可以,独立也可以,随时有选择的权利
- 那年的我们
- 52岁李若彤秀马甲线上热搜,凭什么啊()
- 春季试衣间|春季试衣间|UNIQLO优衣库 UR HOTWIND热风春夏新品搭配 日常搭配 可盐可甜
- 台风来的时候,你的那碗面条热腾腾!