package main import ( "context" "flag" "git.gz.internal.jumaiyx.cn/pkg/config" "git.gz.internal.jumaiyx.cn/pkg/log" "os" "time" ) var ( Name string Version string id, _ = os.Hostname() ) func main() { flag.Parse() bc, err := config.NewConfig().Load() if err != nil { panic(err) } l := log.DefaultLogger() biz, cleanup, err := wireApp(l, bc.Data, bc.Webhook) if err != nil { panic(err) } defer cleanup() ctx := context.TODO() l.WithContext(ctx) biz.Run(ctx) time.Sleep(time.Second * 10) }