2023-01-18 14:13:22 +08:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2024-06-24 14:24:35 +08:00
|
|
|
"fmt"
|
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")
|
|
|
|
myconf.LoadFlag()
|
2023-01-19 11:34:30 +08:00
|
|
|
|
2024-02-19 19:11:43 +08:00
|
|
|
cfg := mylog.DefaultConfig
|
|
|
|
cfg.ConsoleWriter = nil
|
|
|
|
cfg.NeedLogFile = true
|
|
|
|
mylog.Init("debug", cfg)
|
|
|
|
|
2024-06-24 14:24:35 +08:00
|
|
|
myconf.LoadFileTo(myconf.Conf().GetString("conf"), &app.Conf)
|
2023-04-18 20:55:50 +08:00
|
|
|
defer mylog.Flush()
|
2024-06-24 14:24:35 +08:00
|
|
|
|
|
|
|
fmt.Printf("%+v\n", app.Conf)
|
2023-01-18 14:32:14 +08:00
|
|
|
app.Run()
|
2023-01-18 14:13:22 +08:00
|
|
|
}
|