Merge pull request #540 from poloskin/master

gofmt
This commit is contained in:
Vladimir Mihailenco 2017-04-03 11:08:46 +03:00 committed by GitHub
commit c9fbe22817
4 changed files with 4 additions and 4 deletions

View File

@ -650,7 +650,7 @@ func (c *ClusterClient) reaper(idleCheckFrequency time.Duration) {
ticker := time.NewTicker(idleCheckFrequency)
defer ticker.Stop()
for _ = range ticker.C {
for range ticker.C {
nodes, err := c.nodes.All()
if err != nil {
break

View File

@ -29,7 +29,7 @@ func wrapRedisProcess(client *redis.Client) {
var count, avgDur uint32
go func() {
for _ = range time.Tick(3 * time.Second) {
for range time.Tick(3 * time.Second) {
n := atomic.LoadUint32(&count)
dur := time.Duration(atomic.LoadUint32(&avgDur)) * precision
fmt.Printf("%s: processed=%d avg_dur=%s\n", client, n, dur)

View File

@ -319,7 +319,7 @@ func (p *ConnPool) reaper(frequency time.Duration) {
ticker := time.NewTicker(frequency)
defer ticker.Stop()
for _ = range ticker.C {
for range ticker.C {
if p.closed() {
break
}

View File

@ -302,7 +302,7 @@ func (c *Ring) rebalance() {
func (c *Ring) heartbeat() {
ticker := time.NewTicker(c.opt.HeartbeatFrequency)
defer ticker.Stop()
for _ = range ticker.C {
for range ticker.C {
var rebalance bool
c.mu.RLock()