Pārlūkot izejas kodu

allow for multi-digit redis db numbers (eg: 10)

Jason Moiron 10 gadi atpakaļ
vecāks
revīzija
a6450ad861
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      redis/conn.go

+ 1 - 1
redis/conn.go

@@ -162,7 +162,7 @@ func Dial(network, address string, options ...DialOption) (Conn, error) {
 	return c, nil
 }
 
-var pathDBRegexp = regexp.MustCompile(`/(\d)\z`)
+var pathDBRegexp = regexp.MustCompile(`/(\d+)\z`)
 
 // DialURL connects to a Redis server at the given URL using the Redis
 // URI scheme. URLs should follow the draft IANA specification for the