add using default opts
Some checks failed
automerge / automerge (pull_request) Has been skipped
autoapprove / autoapprove (pull_request) Successful in 9s
dependabot-automerge / automerge (pull_request) Has been skipped
codeql / analyze (go) (pull_request) Has been cancelled
prbuild / test (pull_request) Has been cancelled
prbuild / lint (pull_request) Has been cancelled

This commit is contained in:
Денис Евстигнеев 2024-10-08 16:46:57 +03:00
parent f0ef23b732
commit a445f920c0

View File

@ -625,7 +625,7 @@ func NewStore(opts ...store.Option) *Store {
} }
func (r *Store) configure() error { func (r *Store) configure() error {
var universalOptions *goredis.UniversalOptions universalOptions := DefaultUniversalOptions
if r.cli != nil && r.opts.Context == nil { if r.cli != nil && r.opts.Context == nil {
return nil return nil
@ -704,10 +704,6 @@ func (r *Store) configure() error {
} }
} }
if universalOptions == nil {
universalOptions = DefaultUniversalOptions
}
if len(r.opts.Addrs) > 0 { if len(r.opts.Addrs) > 0 {
universalOptions.Addrs = r.opts.Addrs universalOptions.Addrs = r.opts.Addrs
} else { } else {