Refactor log factory constructor

This commit is contained in:
世界
2023-04-03 18:24:20 +08:00
parent 0be3cdc8fb
commit 28aa4c4d1f
10 changed files with 164 additions and 74 deletions

View File

@@ -31,7 +31,10 @@ func check() error {
return err
}
ctx, cancel := context.WithCancel(context.Background())
instance, err := box.New(ctx, options, nil)
instance, err := box.New(box.Options{
Context: ctx,
Options: options,
})
if err == nil {
instance.Close()
}