restructure

This commit is contained in:
yanghao05
2023-04-20 12:11:34 +08:00
parent 6757e00d73
commit 5b8eca5d87
120 changed files with 546 additions and 7303 deletions

View File

@@ -8,9 +8,14 @@ import (
)
var Container *dig.Container = dig.New()
var Cancel context.CancelFunc
func init() {
if err := Container.Provide(context.Background); err != nil {
if err := Container.Provide(func() context.Context {
ctx, cancel := context.WithCancel(context.Background())
Cancel = cancel
return ctx
}); err != nil {
log.Fatal(err)
}
}