浏览代码

Document restrictions on Pool.Dial

Gary Burd 10 年之前
父节点
当前提交
3d0709611e
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      redis/pool.go

+ 4 - 1
redis/pool.go

@@ -94,7 +94,10 @@ var (
 type Pool struct {
 
 	// Dial is an application supplied function for creating and configuring a
-	// connection
+	// connection.
+	//
+	// The connection returned from Dial must not be in a special state
+	// (subscribed to pubsub channel, transaction started, ...).
 	Dial func() (Conn, error)
 
 	// TestOnBorrow is an optional application supplied function for checking