1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-28 06:42:00 +03:00

Remove Addr field from clusterNode

This commit is contained in:
yyoshiki41
2016-10-06 05:20:05 +09:00
parent 5a272d03b9
commit 84ae986659
3 changed files with 25 additions and 23 deletions

View File

@ -24,7 +24,7 @@ type baseClient struct {
}
func (c *baseClient) String() string {
return fmt.Sprintf("Redis<%s db:%d>", c.opt.Addr, c.opt.DB)
return fmt.Sprintf("Redis<%s db:%d>", c.getAddr(), c.opt.DB)
}
func (c *baseClient) conn() (*pool.Conn, bool, error) {
@ -140,6 +140,10 @@ func (c *baseClient) Close() error {
return retErr
}
func (c *baseClient) getAddr() string {
return c.opt.Addr
}
//------------------------------------------------------------------------------
// Client is a Redis client representing a pool of zero or more