Merge pull request #883 from andriikushch/master

fix some linter's warning
This commit is contained in:
Vladimir Mihailenco 2018-10-11 15:36:53 +03:00 committed by GitHub
commit 77f7b88603
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 9 deletions

View File

@ -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)

View File

@ -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() {

View File

@ -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)
} }

View File

@ -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