diff --git a/client.go b/client.go index ddc54f1..eb608bb 100644 --- a/client.go +++ b/client.go @@ -505,7 +505,7 @@ func (c *Client) Send(ml ...*Msg) error { } if err := c.Reset(); err != nil { - return fmt.Errorf("sending RSET command failed: %s", err) + return fmt.Errorf("sending RSET command failed: %w", err) } if err := c.checkConn(); err != nil { return fmt.Errorf("failed to check server connection: %w", err) @@ -556,7 +556,7 @@ func (c *Client) DialAndSendWithContext(ctx context.Context, ml ...*Msg) error { return fmt.Errorf("send failed: %w", err) } if err := c.Close(); err != nil { - return fmt.Errorf("failed to close connction: %s", err) + return fmt.Errorf("failed to close connction: %w", err) } return nil } diff --git a/client_test.go b/client_test.go index 47965ac..645d142 100644 --- a/client_test.go +++ b/client_test.go @@ -951,10 +951,10 @@ func getTestConnection(auth bool) (*Client, error) { } } if err := c.DialWithContext(context.Background()); err != nil { - return c, fmt.Errorf("connection to test server failed: %s", err) + return c, fmt.Errorf("connection to test server failed: %w", err) } if err := c.Close(); err != nil { - return c, fmt.Errorf("disconnect from test server failed: %s", err) + return c, fmt.Errorf("disconnect from test server failed: %w", err) } return c, nil } @@ -988,10 +988,10 @@ func getTestConnectionWithDSN(auth bool) (*Client, error) { } } if err := c.DialWithContext(context.Background()); err != nil { - return c, fmt.Errorf("connection to test server failed: %s", err) + return c, fmt.Errorf("connection to test server failed: %w", err) } if err := c.Close(); err != nil { - return c, fmt.Errorf("disconnect from test server failed: %s", err) + return c, fmt.Errorf("disconnect from test server failed: %w", err) } return c, nil }