From 817c13a80c99f648de249fa0d901a02d87c23273 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8C=85=E5=AD=90?= Date: Mon, 16 Aug 2021 10:53:06 +0800 Subject: [PATCH] fix: code style (#1342) --- config/env/watcher.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/config/env/watcher.go b/config/env/watcher.go index edcaf3e93..2ea02931e 100644 --- a/config/env/watcher.go +++ b/config/env/watcher.go @@ -20,10 +20,8 @@ func NewWatcher() (config.Watcher, error) { // Next will be blocked until the Stop method is called func (w *watcher) Next() ([]*config.KeyValue, error) { - select { - case <-w.ctx.Done(): - return nil, w.ctx.Err() - } + <-w.ctx.Done() + return nil, w.ctx.Err() } func (w *watcher) Stop() error {