code: func (c *channelPool) Get() (interface{}, error) {
  	conns := c.getConns()
  	if conns == nil {
  		return nil, ErrClosed
  	}
  	for {
  		select {
  		case wrapConn := <-conns:
  			if wrapConn == nil {
  				return nil, ErrClosed
  			}
  			//判断是否超时，超时则丢弃
  			if timeout := c.idleTimeout; timeout > 0 {
  				if wrapConn.t.Add(timeout).Before(time.Now()) {
  					//丢弃并关闭该连接
  					c.Close(wrapConn.conn)
  					continue
  				}
  			}
  			//判断是否失效，失效则丢弃，如果用户没有设定 ping 方法，就不检查
  			if c.ping != nil {
  				if err := c.Ping(wrapConn.conn); err != nil {
  					fmt.Println("conn is not able to be connected: ", err)
  					continue
  				}
  			}
  			return wrapConn.conn, nil
  		default:
  			c.mu.Lock()
  			if c.factory == nil {
  				c.mu.Unlock()
  				continue
  			}
  			conn, err := c.factory()
  			c.mu.Unlock()
  			if err != nil {
  				return nil, err
  			}
  
  			return conn, nil
  		}
  	}
  }
docs: // Get 从pool中取一个连接