package main import ( "flag" "git.makemake.in/kzkzzzz/mycommon/myconf" "git.makemake.in/kzkzzzz/mycommon/mylog" "proxyport/app" ) var configPath string func main() { flag.StringVar(&configPath, "c", "config.toml", "配置文件路径") flag.Parse() cfg := mylog.DefaultConfig cfg.ConsoleWriter = nil cfg.NeedLogFile = true mylog.Init("debug", cfg) myconf.Init(configPath, &app.ProxyMap) defer mylog.Flush() app.Run() }