Skip to content

Commit

Permalink
follow to golang-lint 1.40
Browse files Browse the repository at this point in the history
Signed-off-by: monkey <[email protected]>
  • Loading branch information
monkey92t committed May 13, 2021
1 parent 7d319ae commit 26373ef
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions error.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/go-redis/redis/v8/internal/proto"
)

// ErrClosed performs any operation on the closed client will return this error.
var ErrClosed = pool.ErrClosed

type Error interface {
Expand Down
2 changes: 1 addition & 1 deletion internal/hashtag/hashtag.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func RandomSlot() int {
return rand.Intn(slotNumber)
}

// hashSlot returns a consistent slot number between 0 and 16383
// Slot returns a consistent slot number between 0 and 16383
// for any given string key.
func Slot(key string) int {
if key == "" {
Expand Down
2 changes: 2 additions & 0 deletions internal/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ func (l *logger) Printf(ctx context.Context, format string, v ...interface{}) {
_ = l.log.Output(2, fmt.Sprintf(format, v...))
}

// Logger calls Output to print to the stderr.
// Arguments are handled in the manner of fmt.Print.
var Logger Logging = &logger{
log: log.New(os.Stderr, "redis: ", log.LstdFlags|log.Lshortfile),
}
5 changes: 4 additions & 1 deletion internal/pool/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ import (
)

var (
ErrClosed = errors.New("redis: client is closed")
// ErrClosed performs any operation on the closed client will return this error.
ErrClosed = errors.New("redis: client is closed")

// ErrPoolTimeout timed out waiting to get a connection from the connection pool.
ErrPoolTimeout = errors.New("redis: connection pool timeout")
)

Expand Down
1 change: 1 addition & 0 deletions internal/proto/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/go-redis/redis/v8/internal/util"
)

// redis resp protocol data type.
const (
ErrorReply = '-'
StatusReply = '+'
Expand Down

0 comments on commit 26373ef

Please sign in to comment.