From 6aed8aa673f00116bf42e04d0a80718e513b5e9d Mon Sep 17 00:00:00 2001 From: JChien Date: Thu, 18 Dec 2014 00:11:25 +0800 Subject: [PATCH] fix style to match gofmt Signed-off-by: JChien --- discovery/consul/consul.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/discovery/consul/consul.go b/discovery/consul/consul.go index b1c7883c9e..792e8cb381 100644 --- a/discovery/consul/consul.go +++ b/discovery/consul/consul.go @@ -65,7 +65,9 @@ func (s *ConsulDiscoveryService) Fetch() ([]*discovery.Node, error) { } func (s *ConsulDiscoveryService) Watch(callback discovery.WatchCallback) { - for _ = range time.Tick(time.Duration(s.heartbeat) * time.Second) { + c := time.Tick(time.Duration(s.heartbeat) * time.Second) + for { + <-c nodes, err := s.Fetch() if err == nil { callback(nodes)