mirror of
https://github.com/gofiber/storage.git
synced 2025-10-05 08:37:10 +08:00
Fix duplicated code
This commit is contained in:

committed by
GitHub

parent
9190b12c2e
commit
748f85b33f
@@ -64,12 +64,6 @@ func New(config ...Config) *Storage {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithTimeout(context.TODO(), 20*time.Second)
|
||||
defer cancel()
|
||||
if err = client.Connect(ctx); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
// verify that the client can connect
|
||||
if err = client.Ping(context.Background(), nil); err != nil {
|
||||
panic(err)
|
||||
|
Reference in New Issue
Block a user