proxyport/main.go

24 lines
487 B
Go

package main
import (
"git.makemake.in/kzkzzzz/mycommon/myconf"
"git.makemake.in/kzkzzzz/mycommon/mylog"
"github.com/spf13/pflag"
"proxyport/app"
)
func main() {
pflag.String("conf", "config.toml", "config file path")
pflag.String("log.level", "info", "log level")
myconf.LoadFlag()
myconf.LoadFile(myconf.Conf().GetString("conf"))
config := mylog.DefaultConfig
config.Level = myconf.Conf().GetString("log.level")
mylog.Init("", config)
defer mylog.Flush()
app.Run()
}