初始化项目
This commit is contained in:
commit
035ebb150b
42
.air.linux.toml
Normal file
42
.air.linux.toml
Normal file
@ -0,0 +1,42 @@
|
||||
root = "."
|
||||
testdata_dir = "testdata"
|
||||
tmp_dir = "tmp"
|
||||
|
||||
[build]
|
||||
args_bin = []
|
||||
bin = "tmp\\main.exe"
|
||||
cmd = "go build -o ./tmp/main ."
|
||||
delay = 1500
|
||||
exclude_dir = ["assets", "tmp", "vendor", "testdata"]
|
||||
exclude_file = []
|
||||
exclude_regex = ["_test.go"]
|
||||
exclude_unchanged = false
|
||||
follow_symlink = false
|
||||
full_bin = ""
|
||||
include_dir = []
|
||||
include_ext = ["go", "tpl", "tmpl", "html"]
|
||||
include_file = []
|
||||
kill_delay = "0s"
|
||||
log = "build-errors.log"
|
||||
rerun = false
|
||||
rerun_delay = 500
|
||||
send_interrupt = true
|
||||
stop_on_error = false
|
||||
|
||||
[color]
|
||||
app = ""
|
||||
build = "yellow"
|
||||
main = "magenta"
|
||||
runner = "green"
|
||||
watcher = "cyan"
|
||||
|
||||
[log]
|
||||
main_only = false
|
||||
time = false
|
||||
|
||||
[misc]
|
||||
clean_on_exit = false
|
||||
|
||||
[screen]
|
||||
clear_on_rebuild = false
|
||||
keep_scroll = true
|
42
.air.toml
Normal file
42
.air.toml
Normal file
@ -0,0 +1,42 @@
|
||||
root = "."
|
||||
testdata_dir = "testdata"
|
||||
tmp_dir = "tmp"
|
||||
|
||||
[build]
|
||||
args_bin = []
|
||||
bin = "tmp\\main.exe"
|
||||
cmd = "go build -o ./tmp/main.exe ."
|
||||
delay = 1500
|
||||
exclude_dir = ["assets", "tmp", "vendor", "testdata"]
|
||||
exclude_file = []
|
||||
exclude_regex = ["_test.go"]
|
||||
exclude_unchanged = false
|
||||
follow_symlink = false
|
||||
full_bin = ""
|
||||
include_dir = []
|
||||
include_ext = ["go", "tpl", "tmpl", "html"]
|
||||
include_file = []
|
||||
kill_delay = "0s"
|
||||
log = "build-errors.log"
|
||||
rerun = false
|
||||
rerun_delay = 500
|
||||
send_interrupt = true
|
||||
stop_on_error = false
|
||||
|
||||
[color]
|
||||
app = ""
|
||||
build = "yellow"
|
||||
main = "magenta"
|
||||
runner = "green"
|
||||
watcher = "cyan"
|
||||
|
||||
[log]
|
||||
main_only = false
|
||||
time = false
|
||||
|
||||
[misc]
|
||||
clean_on_exit = false
|
||||
|
||||
[screen]
|
||||
clear_on_rebuild = false
|
||||
keep_scroll = true
|
8
init.go
Normal file
8
init.go
Normal file
@ -0,0 +1,8 @@
|
||||
package main
|
||||
|
||||
//go:generate go version
|
||||
//go:generate go env -w GO111MODULE=on
|
||||
//go:generate go env -w GOPROXY=https://goproxy.cn,direct
|
||||
//go:generate go install github.com/cosmtrek/air@latest
|
||||
//go:generate go install github.com/swaggo/swag/cmd/swag@latest
|
||||
//go:generate go mod tidy
|
12
pkg/constants/const.go
Normal file
12
pkg/constants/const.go
Normal file
@ -0,0 +1,12 @@
|
||||
package constants
|
||||
|
||||
const (
|
||||
ConfigFileName = "config"
|
||||
ConfigType = "toml"
|
||||
)
|
||||
|
||||
var ConfigPaths = []string{
|
||||
".",
|
||||
"./conf",
|
||||
"/config",
|
||||
}
|
Loading…
Reference in New Issue
Block a user