forked from mirror/redis
Merge pull request #883 from andriikushch/master
fix some linter's warning
This commit is contained in:
commit
77f7b88603
|
@ -208,11 +208,11 @@ func startCluster(scenario *clusterScenario) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func assertSlotsEqual(slots, wanted []redis.ClusterSlot) error {
|
func assertSlotsEqual(slots, wanted []redis.ClusterSlot) error {
|
||||||
outer_loop:
|
outerLoop:
|
||||||
for _, s2 := range wanted {
|
for _, s2 := range wanted {
|
||||||
for _, s1 := range slots {
|
for _, s1 := range slots {
|
||||||
if slotEqual(s1, s2) {
|
if slotEqual(s1, s2) {
|
||||||
continue outer_loop
|
continue outerLoop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return fmt.Errorf("%v not found in %v", s2, slots)
|
return fmt.Errorf("%v not found in %v", s2, slots)
|
||||||
|
|
|
@ -1958,7 +1958,7 @@ var _ = Describe("Commands", func() {
|
||||||
|
|
||||||
sMembersMap := client.SMembersMap("set")
|
sMembersMap := client.SMembersMap("set")
|
||||||
Expect(sMembersMap.Err()).NotTo(HaveOccurred())
|
Expect(sMembersMap.Err()).NotTo(HaveOccurred())
|
||||||
Expect(sMembersMap.Val()).To(Equal(map[string]struct{}{"Hello": struct{}{}, "World": struct{}{}}))
|
Expect(sMembersMap.Val()).To(Equal(map[string]struct{}{"Hello": {}, "World": {}}))
|
||||||
})
|
})
|
||||||
|
|
||||||
It("should SMove", func() {
|
It("should SMove", func() {
|
||||||
|
|
|
@ -2,16 +2,11 @@ package proto_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"strings"
|
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/go-redis/redis/internal/proto"
|
"github.com/go-redis/redis/internal/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newReader(s string) *proto.Reader {
|
|
||||||
return proto.NewReader(strings.NewReader(s))
|
|
||||||
}
|
|
||||||
|
|
||||||
func BenchmarkReader_ParseReply_Status(b *testing.B) {
|
func BenchmarkReader_ParseReply_Status(b *testing.B) {
|
||||||
benchmarkParseReply(b, "+OK\r\n", nil, false)
|
benchmarkParseReply(b, "+OK\r\n", nil, false)
|
||||||
}
|
}
|
||||||
|
|
2
redis.go
2
redis.go
|
@ -323,7 +323,7 @@ func txPipelineReadQueued(rd *proto.Reader, cmds []Cmder) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
for _ = range cmds {
|
for range cmds {
|
||||||
err = statusCmd.readReply(rd)
|
err = statusCmd.readReply(rd)
|
||||||
if err != nil && !internal.IsRedisError(err) {
|
if err != nil && !internal.IsRedisError(err) {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue