Skip to content

Commit 26373ef

Browse files
committed
follow to golang-lint 1.40
Signed-off-by: monkey <golang@88.com>
1 parent 7d319ae commit 26373ef

File tree

5 files changed

+9
-2
lines changed

5 files changed

+9
-2
lines changed

error.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"github.com/go-redis/redis/v8/internal/proto"
1111
)
1212

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

1516
type Error interface {

internal/hashtag/hashtag.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func RandomSlot() int {
6060
return rand.Intn(slotNumber)
6161
}
6262

63-
// hashSlot returns a consistent slot number between 0 and 16383
63+
// Slot returns a consistent slot number between 0 and 16383
6464
// for any given string key.
6565
func Slot(key string) int {
6666
if key == "" {

internal/log.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ func (l *logger) Printf(ctx context.Context, format string, v ...interface{}) {
1919
_ = l.log.Output(2, fmt.Sprintf(format, v...))
2020
}
2121

22+
// Logger calls Output to print to the stderr.
23+
// Arguments are handled in the manner of fmt.Print.
2224
var Logger Logging = &logger{
2325
log: log.New(os.Stderr, "redis: ", log.LstdFlags|log.Lshortfile),
2426
}

internal/pool/pool.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ import (
1212
)
1313

1414
var (
15-
ErrClosed = errors.New("redis: client is closed")
15+
// ErrClosed performs any operation on the closed client will return this error.
16+
ErrClosed = errors.New("redis: client is closed")
17+
18+
// ErrPoolTimeout timed out waiting to get a connection from the connection pool.
1619
ErrPoolTimeout = errors.New("redis: connection pool timeout")
1720
)
1821

internal/proto/reader.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"github.com/go-redis/redis/v8/internal/util"
99
)
1010

11+
// redis resp protocol data type.
1112
const (
1213
ErrorReply = '-'
1314
StatusReply = '+'

0 commit comments

Comments
 (0)