add close

This commit is contained in:
yanghao05
2023-06-01 11:02:10 +08:00
parent 690df80c39
commit d28d9649ed
6 changed files with 20 additions and 4 deletions

View File

@@ -24,6 +24,9 @@ func Provide(opts ...opt.Option) error {
return nil, errors.Wrap(err, "failed to ping")
}
container.AddCloseAble(func() {
client.Close()
})
return client, nil
}, o.DiOptions()...)
}