1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-28 06:42:00 +03:00

gofumports

This commit is contained in:
Vladimir Mihailenco
2020-07-16 09:52:07 +03:00
parent 62469e4f42
commit 14c843ef89
15 changed files with 72 additions and 87 deletions

View File

@ -14,7 +14,6 @@ func TestGinkgoSuite(t *testing.T) {
}
var _ = Describe("CRC16", func() {
// http://redis.io/topics/cluster-spec#keys-distribution-model
It("should calculate CRC16", func() {
tests := []struct {
@ -29,11 +28,9 @@ var _ = Describe("CRC16", func() {
Expect(crc16sum(test.s)).To(Equal(test.n), "for %s", test.s)
}
})
})
var _ = Describe("HashSlot", func() {
It("should calculate hash slots", func() {
tests := []struct {
key string
@ -70,5 +67,4 @@ var _ = Describe("HashSlot", func() {
Expect(Slot(test.one)).To(Equal(Slot(test.two)), "for %s <-> %s", test.one, test.two)
}
})
})

View File

@ -29,4 +29,3 @@ func init() {
metric.WithDescription("the number of connections created"),
)
}

View File

@ -11,8 +11,10 @@ import (
"github.com/go-redis/redis/v8/internal"
)
var ErrClosed = errors.New("redis: client is closed")
var ErrPoolTimeout = errors.New("redis: connection pool timeout")
var (
ErrClosed = errors.New("redis: client is closed")
ErrPoolTimeout = errors.New("redis: connection pool timeout")
)
var timers = sync.Pool{
New: func() interface{} {

View File

@ -13,7 +13,7 @@ import (
type writer interface {
io.Writer
io.ByteWriter
//io.StringWriter
// io.StringWriter
WriteString(s string) (n int, err error)
}