restructure
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user