Fix duplicated code

This commit is contained in:
Juan Calderon-Perez
2023-11-16 08:26:13 -05:00
committed by GitHub
parent 9190b12c2e
commit 748f85b33f

View File

@@ -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)