package main import ( "fmt" "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") myconf.LoadFlag() cfg := mylog.DefaultConfig cfg.ConsoleWriter = nil cfg.NeedLogFile = true mylog.Init("debug", cfg) myconf.LoadFileTo(myconf.Conf().GetString("conf"), &app.Conf) defer mylog.Flush() fmt.Printf("%+v\n", app.Conf) app.Run() }