diff --git a/cluster_test.go b/cluster_test.go index 9a1d55fb..b8003baa 100644 --- a/cluster_test.go +++ b/cluster_test.go @@ -208,11 +208,11 @@ func startCluster(scenario *clusterScenario) error { } func assertSlotsEqual(slots, wanted []redis.ClusterSlot) error { -outer_loop: +outerLoop: for _, s2 := range wanted { for _, s1 := range slots { if slotEqual(s1, s2) { - continue outer_loop + continue outerLoop } } return fmt.Errorf("%v not found in %v", s2, slots) diff --git a/commands_test.go b/commands_test.go index d0c8e573..656cced0 100644 --- a/commands_test.go +++ b/commands_test.go @@ -1958,7 +1958,7 @@ var _ = Describe("Commands", func() { sMembersMap := client.SMembersMap("set") 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() { diff --git a/internal/proto/reader_test.go b/internal/proto/reader_test.go index 54e85afe..c4a4c128 100644 --- a/internal/proto/reader_test.go +++ b/internal/proto/reader_test.go @@ -2,16 +2,11 @@ package proto_test import ( "bytes" - "strings" "testing" "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) { benchmarkParseReply(b, "+OK\r\n", nil, false) } diff --git a/redis.go b/redis.go index 8fa85ddf..64056713 100644 --- a/redis.go +++ b/redis.go @@ -323,7 +323,7 @@ func txPipelineReadQueued(rd *proto.Reader, cmds []Cmder) error { return err } - for _ = range cmds { + for range cmds { err = statusCmd.readReply(rd) if err != nil && !internal.IsRedisError(err) { return err