mirror of
https://github.com/redis/go-redis.git
synced 2025-07-26 19:21:03 +03:00
Format code and fix go vet (#2696)
* run go fix ./... Signed-off-by: Tiago Peczenyj <tpeczenyj@weborama.com> * run make fmt Signed-off-by: Tiago Peczenyj <tpeczenyj@weborama.com> * fix go vet ./... issues * Update README.md Reorder imports with the rules defined in the Makefile as if we run `make fmt` * run gofumpt -w . * update Makefile to use gofumpt instead gofmt * increment makefile * format test * format tests Signed-off-by: Tiago Peczenyj <tpeczenyj@weborama.com> --------- Signed-off-by: Tiago Peczenyj <tpeczenyj@weborama.com> Co-authored-by: ofekshenawa <104765379+ofekshenawa@users.noreply.github.com>
This commit is contained in:
@ -232,7 +232,6 @@ var _ = Describe("Commands", func() {
|
||||
})
|
||||
|
||||
It("should ClientSetInfo", func() {
|
||||
|
||||
pipe := client.Pipeline()
|
||||
|
||||
// Test setting the libName
|
||||
@ -413,7 +412,6 @@ var _ = Describe("Commands", func() {
|
||||
})
|
||||
|
||||
It("should filter commands by ACL category", func() {
|
||||
|
||||
filter := &redis.FilterBy{
|
||||
ACLCat: "admin",
|
||||
}
|
||||
@ -580,7 +578,6 @@ var _ = Describe("Commands", func() {
|
||||
n, err = client.Exists(ctx, "key").Result()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(n).To(Equal(int64(0)))
|
||||
|
||||
})
|
||||
|
||||
It("should Keys", func() {
|
||||
@ -727,7 +724,6 @@ var _ = Describe("Commands", func() {
|
||||
})
|
||||
|
||||
It("should PExpireTime", func() {
|
||||
|
||||
// The command returns -1 if the key exists but has no associated expiration time.
|
||||
// The command returns -2 if the key does not exist.
|
||||
pExpireTime := client.PExpireTime(ctx, "key")
|
||||
@ -966,7 +962,6 @@ var _ = Describe("Commands", func() {
|
||||
})
|
||||
|
||||
It("should ExpireTime", func() {
|
||||
|
||||
// The command returns -1 if the key exists but has no associated expiration time.
|
||||
// The command returns -2 if the key does not exist.
|
||||
expireTimeCmd := client.ExpireTime(ctx, "key")
|
||||
@ -988,7 +983,6 @@ var _ = Describe("Commands", func() {
|
||||
})
|
||||
|
||||
It("should TTL", func() {
|
||||
|
||||
// The command returns -1 if the key exists but has no associated expire
|
||||
// The command returns -2 if the key does not exist.
|
||||
ttl := client.TTL(ctx, "key")
|
||||
@ -2042,7 +2036,6 @@ var _ = Describe("Commands", func() {
|
||||
})
|
||||
|
||||
It("should ACL LOG", func() {
|
||||
|
||||
err := client.Do(ctx, "acl", "setuser", "test", ">test", "on", "allkeys", "+get").Err()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
@ -2073,7 +2066,6 @@ var _ = Describe("Commands", func() {
|
||||
limitedLogEntries, err := client.ACLLog(ctx, 2).Result()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(len(limitedLogEntries)).To(Equal(2))
|
||||
|
||||
})
|
||||
|
||||
It("should ACL LOG RESET", func() {
|
||||
@ -2087,7 +2079,6 @@ var _ = Describe("Commands", func() {
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(len(logEntries)).To(Equal(0))
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
Describe("hashes", func() {
|
||||
@ -2699,7 +2690,6 @@ var _ = Describe("Commands", func() {
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(key).To(Equal("list2"))
|
||||
Expect(val).To(Equal([]string{"a", "b", "c", "d"}))
|
||||
|
||||
})
|
||||
|
||||
It("should BLMPopBlocks", func() {
|
||||
@ -2721,7 +2711,7 @@ var _ = Describe("Commands", func() {
|
||||
case <-done:
|
||||
Fail("BLMPop is not blocked")
|
||||
case <-time.After(time.Second):
|
||||
//ok
|
||||
// ok
|
||||
}
|
||||
|
||||
_, err := client.LPush(ctx, "list_list", "a").Result()
|
||||
@ -2729,7 +2719,7 @@ var _ = Describe("Commands", func() {
|
||||
|
||||
select {
|
||||
case <-done:
|
||||
//ok
|
||||
// ok
|
||||
case <-time.After(time.Second):
|
||||
Fail("BLMPop is still blocked")
|
||||
}
|
||||
@ -4184,7 +4174,6 @@ var _ = Describe("Commands", func() {
|
||||
})
|
||||
|
||||
It("should ZMPop", func() {
|
||||
|
||||
err := client.ZAdd(ctx, "zset", redis.Z{Score: 1, Member: "one"}).Err()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
err = client.ZAdd(ctx, "zset", redis.Z{Score: 2, Member: "two"}).Err()
|
||||
@ -4256,11 +4245,9 @@ var _ = Describe("Commands", func() {
|
||||
Score: 6,
|
||||
Member: "six",
|
||||
}}))
|
||||
|
||||
})
|
||||
|
||||
It("should BZMPop", func() {
|
||||
|
||||
err := client.ZAdd(ctx, "zset", redis.Z{Score: 1, Member: "one"}).Err()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
err = client.ZAdd(ctx, "zset", redis.Z{Score: 2, Member: "two"}).Err()
|
||||
@ -4360,7 +4347,7 @@ var _ = Describe("Commands", func() {
|
||||
case <-done:
|
||||
Fail("BZMPop is not blocked")
|
||||
case <-time.After(time.Second):
|
||||
//ok
|
||||
// ok
|
||||
}
|
||||
|
||||
err := client.ZAdd(ctx, "list_list", redis.Z{Score: 1, Member: "one"}).Err()
|
||||
@ -4368,7 +4355,7 @@ var _ = Describe("Commands", func() {
|
||||
|
||||
select {
|
||||
case <-done:
|
||||
//ok
|
||||
// ok
|
||||
case <-time.After(time.Second):
|
||||
Fail("BZMPop is still blocked")
|
||||
}
|
||||
@ -6928,7 +6915,6 @@ var _ = Describe("Commands", func() {
|
||||
|
||||
close(started)
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
Describe("SlowLogGet", func() {
|
||||
@ -6949,7 +6935,6 @@ var _ = Describe("Commands", func() {
|
||||
Expect(len(result)).NotTo(BeZero())
|
||||
})
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
type numberStruct struct {
|
||||
|
Reference in New Issue
Block a user