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.
39 lines
551 B
39 lines
551 B
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, bc.Data, l) |
|
if err != nil { |
|
panic(err) |
|
} |
|
defer cleanup() |
|
ctx := context.TODO() |
|
l.WithContext(ctx) |
|
biz.Check(ctx) |
|
|
|
}
|
|
|