mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Don't remove connection from the pool on redis errors.
This commit is contained in:
23
error.go
Normal file
23
error.go
Normal file
@ -0,0 +1,23 @@
|
||||
package redis
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// Redis nil reply.
|
||||
var Nil = errorf("redis: nil")
|
||||
|
||||
// Redis transaction failed.
|
||||
var TxFailedErr = errorf("redis: transaction failed")
|
||||
|
||||
type redisError struct {
|
||||
s string
|
||||
}
|
||||
|
||||
func errorf(s string, args ...interface{}) redisError {
|
||||
return redisError{s: fmt.Sprintf(s, args...)}
|
||||
}
|
||||
|
||||
func (err redisError) Error() string {
|
||||
return err.s
|
||||
}
|
Reference in New Issue
Block a user