Browse Source

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

Jason Moiron 10 years ago
parent
commit
a6450ad861
1 changed files with 1 additions and 1 deletions
  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