فهرست منبع

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}
 }