-
Notifications
You must be signed in to change notification settings - Fork 0
/
.air.toml
55 lines (47 loc) · 1.45 KB
/
.air.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# [Air](https://github.com/cosmtrek/air) TOML 格式的配置文件
# 工作目录
# 使用 . 或绝对路径,请注意 `tmp_dir` 目录必须在 `root` 目录下
root = "."
testdata_dir = "testdata"
tmp_dir = "tmp"
[build]
cmd = "go build -o ./tmp/main ."
bin = "./tmp/main"
# full_bin 用于添加额外参数以执行二进制文件 => 可以添加额外的编译标识例如添加 GIN_MODE=release
# full_bin = "GIN_MODE=release ./tmp/main"
full_bin = "./tmp/main server -c config/config.yaml"
# 如果文件更改过于频繁,则没有必要在每次更改时都触发构建。可以设置触发构建的延迟时间
delay = 1000
kill_delay = "0s"
# 日志文件名,该日志文件放置在你的`tmp_dir`中
log = "build-errors.log"
# 中断
send_interrupt = false
# 发生构建错误时,停止运行旧的二进制文件。
stop_on_error = true
follow_symlink = false
exclude_unchanged = false
# 监听排除目录
exclude_dir = ["assets", "tmp", "vendor", "testdata"]
# 监听排除文件
exclude_file = []
# 监听排除文件正则
exclude_regex = ["_test.go"]
# 监听目录
include_dir = []
# 监听指定文件扩展名
include_ext = ["go", "tpl", "tmpl", "html"]
[color]
app = ""
build = "yellow"
main = "magenta"
runner = "green"
watcher = "cyan"
[log]
# 显示日志时间
time = false
[misc]
# 退出时删除tmp目录
clean_on_exit = false
[screen]
clear_on_rebuild = false