Skip to content

Commit 3fcd5d5

Browse files
authored
Merge branch 'master' into feat/IsClusterMode
2 parents 788275a + 3d4310a commit 3fcd5d5

File tree

6 files changed

+13
-6
lines changed

6 files changed

+13
-6
lines changed

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.18
55
require (
66
github.com/bsm/ginkgo/v2 v2.12.0
77
github.com/bsm/gomega v1.27.10
8-
github.com/cespare/xxhash/v2 v2.2.0
8+
github.com/cespare/xxhash/v2 v2.3.0
99
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f
1010
)
1111

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
22
github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c=
33
github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA=
44
github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0=
5-
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
6-
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
5+
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
6+
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
77
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
88
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=

hash_commands.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ func (c cmdable) HExpire(ctx context.Context, key string, expiration time.Durati
225225
return cmd
226226
}
227227

228-
// HExpire - Sets the expiration time for specified fields in a hash in seconds.
228+
// HExpireWithArgs - Sets the expiration time for specified fields in a hash in seconds.
229229
// It requires a key, an expiration duration, a struct with boolean flags for conditional expiration settings (NX, XX, GT, LT), and a list of fields.
230230
// The command constructs an argument list starting with "HEXPIRE", followed by the key, duration, any conditional flags, and the specified fields.
231231
// For more information - https://redis.io/commands/hexpire/

options.go

+4
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ func NewDialer(opt *Options) func(context.Context, string, string) (net.Conn, er
267267
// URL attributes (scheme, host, userinfo, resp.), query parameters using these
268268
// names will be treated as unknown parameters
269269
// - unknown parameter names will result in an error
270+
// - use "skip_verify=true" to ignore TLS certificate validation
270271
//
271272
// Examples:
272273
//
@@ -487,6 +488,9 @@ func setupConnParams(u *url.URL, o *Options) (*Options, error) {
487488
if q.err != nil {
488489
return nil, q.err
489490
}
491+
if o.TLSConfig != nil && q.has("skip_verify") {
492+
o.TLSConfig.InsecureSkipVerify = q.bool("skip_verify")
493+
}
490494

491495
// any parameters left?
492496
if r := q.remaining(); len(r) > 0 {

options_test.go

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ func TestParseURL(t *testing.T) {
3030
}, {
3131
url: "rediss://localhost:123",
3232
o: &Options{Addr: "localhost:123", TLSConfig: &tls.Config{ /* no deep comparison */ }},
33+
}, {
34+
url: "rediss://localhost:123/?skip_verify=true",
35+
o: &Options{Addr: "localhost:123", TLSConfig: &tls.Config{InsecureSkipVerify: true}},
3336
}, {
3437
url: "redis://:bar@localhost:123",
3538
o: &Options{Addr: "localhost:123", Password: "bar"},

search_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ var _ = Describe("RediSearch commands Resp 2", Label("search"), func() {
136136
Expect(err).NotTo(HaveOccurred())
137137
Expect(val).To(BeEquivalentTo("OK"))
138138
WaitForIndexing(client, "txt")
139-
client.HSet(ctx, "doc1", "title", "RediSearch", "body", "Redisearch impements a search engine on top of redis")
139+
client.HSet(ctx, "doc1", "title", "RediSearch", "body", "Redisearch implements a search engine on top of redis")
140140
res1, err := client.FTSearchWithArgs(ctx, "txt", "search engine", &redis.FTSearchOptions{NoContent: true, Verbatim: true, LimitOffset: 0, Limit: 5}).Result()
141141
Expect(err).NotTo(HaveOccurred())
142142
Expect(res1.Total).To(BeEquivalentTo(int64(1)))
@@ -482,7 +482,7 @@ var _ = Describe("RediSearch commands Resp 2", Label("search"), func() {
482482
WaitForIndexing(client, "idx1")
483483

484484
client.HSet(ctx, "search", "title", "RediSearch",
485-
"body", "Redisearch impements a search engine on top of redis",
485+
"body", "Redisearch implements a search engine on top of redis",
486486
"parent", "redis",
487487
"random_num", 10)
488488
client.HSet(ctx, "ai", "title", "RedisAI",

0 commit comments

Comments
 (0)