瀏覽代碼

Update doc to say that NewPool is deprecated.

I hope that the new doc will discourage people from forking the project
to add arguments to NewPool.
Gary Burd 11 年之前
父節點
當前提交
204566ad8c
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      redis/pool.go

+ 2 - 1
redis/pool.go

@@ -124,7 +124,8 @@ type idleConn struct {
 	t time.Time
 }
 
-// NewPool is a convenience function for initializing a pool.
+// NewPool creates a new pool. This function is deprecated. Applications should
+// initialize the Pool fields directly as shown in example.
 func NewPool(newFn func() (Conn, error), maxIdle int) *Pool {
 	return &Pool{Dial: newFn, MaxIdle: maxIdle}
 }