unity容器监听
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
523 B

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