mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 16:21:11 +08:00
fix flags wrong
This commit is contained in:
parent
ef783f33c2
commit
40f0e3ad06
1 changed files with 11 additions and 13 deletions
24
main.go
24
main.go
|
|
@ -24,15 +24,17 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
cfg *config.Config
|
cfg *config.Config
|
||||||
router *gin.Engine
|
router *gin.Engine
|
||||||
configfile = "/data/ghproxy/config/config.toml"
|
configfile = "/data/ghproxy/config/config.toml"
|
||||||
cfgfile string
|
cfgfile string
|
||||||
version string
|
version string
|
||||||
dev string
|
dev string
|
||||||
runMode string
|
runMode string
|
||||||
limiter *rate.RateLimiter
|
limiter *rate.RateLimiter
|
||||||
iplimiter *rate.IPRateLimiter
|
iplimiter *rate.IPRateLimiter
|
||||||
|
showVersion bool
|
||||||
|
showHelp bool
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
@ -239,10 +241,6 @@ func init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
loadConfig()
|
loadConfig()
|
||||||
if cfg = nil {
|
|
||||||
fmt.Println("Failed to load config")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
setupLogger(cfg)
|
setupLogger(cfg)
|
||||||
InitReq(cfg)
|
InitReq(cfg)
|
||||||
loadlist(cfg)
|
loadlist(cfg)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue