Explorar el Código

Merge pull request #158 from jmoiron/master

allow for multi-digit redis db numbers (eg: "10")
Gary Burd hace 10 años
padre
commit
764a32c188
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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