# Air 热重载配置:改 .go 后自动重新编译并重启 # 默认使用开发/测试环境:env_files 加载 .env.development root = "." tmp_dir = "tmp" env_files = [".env", ".env.development"] # Windows 下用 .exe 避免系统弹出「选择应用打开 main」 [build] bin = "./tmp/main.exe" cmd = "go build -o ./tmp/main.exe ./cmd/server" delay = 800 exclude_dir = ["tmp", "vendor"] exclude_regex = ["_test\\.go$"] include_ext = ["go", "tpl", "tmpl", "html"] log = "build-errors.log" stop_on_error = true [log] time = false [misc] clean_on_exit = true [screen] clear_on_rebuild = false