Make golangci-lint errorlint happy

This commit is contained in:
Winni Neessen 2022-10-17 18:16:00 +02:00
parent 321b512c95
commit d200e982bf
Signed by: wneessen
GPG key ID: 5F3AF39B820C119D
2 changed files with 6 additions and 6 deletions

View file

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

View file

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