浏览代码

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

Jason Moiron 10 年之前
父节点
当前提交
a6450ad861
共有 1 个文件被更改,包括 1 次插入1 次删除
  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