From 014165ded6c590525a65950f10b22f1463252b77 Mon Sep 17 00:00:00 2001 From: Nan Deng Date: Mon, 30 Jun 2014 15:39:03 -0700 Subject: [PATCH] style --- pkg/util/fake_etcd_client.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkg/util/fake_etcd_client.go b/pkg/util/fake_etcd_client.go index 3ad9997be3b..f4958c60b4e 100644 --- a/pkg/util/fake_etcd_client.go +++ b/pkg/util/fake_etcd_client.go @@ -122,10 +122,8 @@ func (f *FakeEtcdClient) Watch(prefix string, waitIndex uint64, recursive bool, f.WatchInjectError = injectedError f.nrUnreadyChannels.Done() - defer func() { - // After calling this function, the WatchStop channel will not be ready - f.nrUnreadyChannels.Add(3) - }() + // After calling this function, the WatchStop channel will not be ready + defer f.nrUnreadyChannels.Add(3) select { case <-stop: