1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-28 06:42:00 +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:
Tiago Peczenyj
2023-09-20 13:03:44 +02:00
committed by GitHub
parent 1a7d2f4ad4
commit e8ad794e96
28 changed files with 42 additions and 85 deletions

View File

@ -7,6 +7,7 @@ import (
. "github.com/bsm/ginkgo/v2"
. "github.com/bsm/gomega"
"github.com/redis/go-redis/v9"
)
@ -159,7 +160,6 @@ var _ = Describe("Probabilistic commands", Label("probabilistic"), func() {
Expect(resultAdd2[0]).To(BeFalse())
Expect(resultAdd2[1]).To(BeFalse())
Expect(resultAdd2[2]).To(BeTrue())
})
It("should BFMExists", Label("bloom", "bfmexists"), func() {
@ -424,7 +424,6 @@ var _ = Describe("Probabilistic commands", Label("probabilistic"), func() {
Expect(result[2]).To(BeTrue())
Expect(result[3]).To(BeFalse())
})
})
Describe("CMS", Label("cms"), func() {
@ -438,7 +437,6 @@ var _ = Describe("Probabilistic commands", Label("probabilistic"), func() {
Expect(result[0]).To(BeEquivalentTo(int64(1)))
Expect(result[1]).To(BeEquivalentTo(int64(2)))
Expect(result[2]).To(BeEquivalentTo(int64(3)))
})
It("should CMSInitByDim and CMSInfo", Label("cms", "cmsinitbydim", "cmsinfo"), func() {
@ -512,9 +510,7 @@ var _ = Describe("Probabilistic commands", Label("probabilistic"), func() {
Expect(result[0]).To(BeEquivalentTo(int64(1)))
Expect(result[1]).To(BeEquivalentTo(int64(6)))
Expect(result[2]).To(BeEquivalentTo(int64(6)))
})
})
Describe("TopK", Label("topk"), func() {
@ -580,7 +576,6 @@ var _ = Describe("Probabilistic commands", Label("probabilistic"), func() {
Expect(resultInfo.Depth).To(BeEquivalentTo(int64(8)))
Expect(resultInfo.Decay).To(BeEquivalentTo(0.5))
})
})
Describe("t-digest", Label("tdigest"), func() {
@ -691,7 +686,6 @@ var _ = Describe("Probabilistic commands", Label("probabilistic"), func() {
reset, err := client.TDigestReset(ctx, "tdigest1").Result()
Expect(err).NotTo(HaveOccurred())
Expect(reset).To(BeEquivalentTo("OK"))
})
It("should TDigestCreateWithCompression", Label("tdigest", "tcreatewithcompression"), func() {