1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-29 17:41:15 +03:00

feat(options): panic when options are nil (#3363)

Client creation should panic when options are nil.
This commit is contained in:
Nedyalko Dyakov
2025-04-30 09:33:40 +03:00
committed by GitHub
parent 683f644ec2
commit d54e848055
6 changed files with 75 additions and 0 deletions

View File

@ -523,6 +523,9 @@ type Ring struct {
}
func NewRing(opt *RingOptions) *Ring {
if opt == nil {
panic("redis: NewRing nil options")
}
opt.init()
hbCtx, hbCancel := context.WithCancel(context.Background())