This commit is contained in:
wjqserver 2025-04-03 16:39:56 +08:00
parent b02aaeba8a
commit ff412f94ec
14 changed files with 386 additions and 104 deletions

14
main.go
View file

@ -36,21 +36,13 @@ var (
runMode string
limiter *rate.RateLimiter
iplimiter *rate.IPRateLimiter
showVersion bool // 新增的版本号标志
showHelp bool // 新增的帮助标志
showVersion bool
showHelp bool
)
var (
//go:embed pages/*
pagesFS embed.FS
/*
//go:embed pages/bootstrap/*
BootstrapPagesFS embed.FS
//go:embed pages/nebula/*
NebulaPagesFS embed.FS
//go:embed pages/design/*
DesignPagesFS embed.FS
*/
)
var (
@ -101,7 +93,7 @@ func readFlag() {
fmt.Fprintf(os.Stderr, " %s\n", flag)
}
if len(invalidFlags) > 0 {
os.Exit(2) // 使用非零状态码退出,表示有错误
os.Exit(2)
}
}