Explorar o código

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 %!s(int64=11) %!d(string=hai) anos
pai
achega
204566ad8c
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  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}
 }