package main import ( "context" "flag" "fmt" "git.gz.internal.jumaiyx.cn/pkg/config" "git.gz.internal.jumaiyx.cn/pkg/log" "os" ) var ( Name string Version string id, _ = os.Hostname() ) func main() { flag.Parse() c, err := config.New().Conf("./configs/config.yaml") if err != nil { fmt.Println(err) panic(err) } bc := c.Get() l := log.NewLogger(c.Get().Log) biz, cleanup, err := wireApp(bc.Server, l) if err != nil { panic(err) } defer cleanup() ctx := context.TODO() l.WithContext(ctx) biz.Check(ctx) }