1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-28 06:42:00 +03:00

feat: update to ParseClusterURL and use addr param

This commit is contained in:
Stephanie Hingtgen
2021-10-18 09:07:36 -05:00
parent 7daa7f91fd
commit 175d0d81fc
3 changed files with 102 additions and 118 deletions

View File

@ -296,7 +296,14 @@ func (o *queryOptions) string(name string) string {
if len(vs) == 0 {
return ""
}
delete(o.q, name) // enable detection of unknown parameters
// enable detection of unknown parameters
if len(vs) > 1 {
o.q[name] = o.q[name][:len(vs)-1]
} else {
delete(o.q, name)
}
return vs[len(vs)-1]
}