This commit is contained in:
XOF
2025-11-20 12:24:05 +08:00
commit f28bdc751f
164 changed files with 64248 additions and 0 deletions

37
.air.toml Normal file
View File

@@ -0,0 +1,37 @@
# .air.toml
# [_meta] 部分是为了让IDE如VSCode知道这是TOML文件可选
[_meta]
"version" = "v1.49.0"
# 工作目录,"." 表示项目根目录
root = "."
# 临时文件目录air会在这里生成可执行文件
tmp_dir = "tmp"
[build]
# 编译的入口文件,请确保路径与您的项目结构一致
cmd = "go build -o ./tmp/main.exe ./cmd/server"
# cmd = "cmd /c build.bat"
# 编译后生成的可执行文件
bin = "tmp/main.exe"
# 监视以下后缀名的文件,一旦变动就触发重新编译
# include_ext = ["go", "tpl", "tmpl", "html", "css", "js"]
include_ext = ["go", "tpl", "tmpl", "html"]
# 排除以下目录,避免不必要地重载
exclude_dir = ["assets", "tmp", "vendor", "web/static/images"]
# 发生构建错误时,只打印日志而不退出
stop_on_error = false
# 给构建日志加上一个漂亮的前缀,方便识别。
log = "air-build.log"
# 增加一点延迟,防止文件系统在保存瞬间触发多次事件。
delay = 1000 # ms
[log]
# 日志输出带时间
time = true
color = true
[misc]
# 删除临时文件
clean_on_exit = true