mirror of
https://github.com/redis/go-redis.git
synced 2025-07-20 22:42:59 +03:00
use len over errCh
This commit is contained in:
@ -606,7 +606,7 @@ func (c *sentinelFailover) MasterAddr(ctx context.Context) (string, error) {
|
|||||||
if masterAddr != "" {
|
if masterAddr != "" {
|
||||||
return masterAddr, nil
|
return masterAddr, nil
|
||||||
}
|
}
|
||||||
errs := make([]error, 0, len(c.sentinelAddrs))
|
errs := make([]error, 0, len(errCh))
|
||||||
for err := range errCh {
|
for err := range errCh {
|
||||||
errs = append(errs, err)
|
errs = append(errs, err)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user