proxyport/main.go

24 lines
487 B
Go
Raw Normal View History

2023-01-18 14:13:22 +08:00
package main
import (
2023-04-21 18:20:54 +08:00
"git.makemake.in/kzkzzzz/mycommon/myconf"
"git.makemake.in/kzkzzzz/mycommon/mylog"
2024-06-24 14:24:35 +08:00
"github.com/spf13/pflag"
2023-01-18 14:13:22 +08:00
"proxyport/app"
)
func main() {
2024-06-24 14:24:35 +08:00
pflag.String("conf", "config.toml", "config file path")
2024-08-20 12:28:12 +08:00
pflag.String("log.level", "info", "log level")
2024-06-24 14:24:35 +08:00
myconf.LoadFlag()
2023-01-19 11:34:30 +08:00
2024-08-20 12:28:12 +08:00
myconf.LoadFile(myconf.Conf().GetString("conf"))
2024-02-19 19:11:43 +08:00
2024-08-20 12:28:12 +08:00
config := mylog.DefaultConfig
config.Level = myconf.Conf().GetString("log.level")
mylog.Init("", config)
2023-04-18 20:55:50 +08:00
defer mylog.Flush()
2024-06-24 14:24:35 +08:00
2023-01-18 14:32:14 +08:00
app.Run()
2023-01-18 14:13:22 +08:00
}