opts.Addrs = append(opts.Addrs, strings.Split(uri.Host, ",")...)
}
if uri.Path != "" {
- if db, err := strconv.Atoi(uri.Path); err == nil {
+ if db, err := strconv.Atoi(uri.Path[1:]); err == nil {
opts.DB = db
}
}
opts.Addrs = append(opts.Addrs, strings.Split(uri.Host, ",")...)
}
if uri.Path != "" {
- if db, err := strconv.Atoi(uri.Path); err == nil {
+ if db, err := strconv.Atoi(uri.Path[1:]); err == nil {
opts.DB = db
}
}
opts.Addrs = append(opts.Addrs, strings.Split(uri.Host, ",")...)
}
if uri.Path != "" {
- if db, err := strconv.Atoi(uri.Path); err == nil {
+ if db, err := strconv.Atoi(uri.Path[1:]); err == nil {
opts.DB = db
}
}