modd 应用可以在修改文件后动态重载服务器,避免手动重启,节约时间。
$ go install github.com/cortesi/modd/cmd/modd@latest
// config modd.conf
**/*.go {
prep: go test @dirmods
}
# Exclude all test files of the form *_test.go
**/*.go !**/*_test.go {
prep: go build -o yourappname .
daemon: ./yourappname
}
// run modd
modd