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

@@ -26,7 +26,10 @@ func CheckConfig(configContent string) error {
}
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
instance, err := box.New(ctx, options, nil)
instance, err := box.New(box.Options{
Context: ctx,
Options: options,
})
if err == nil {
instance.Close()
}