From 6c4ebe12f3c737417f9ef07d4c4c7ac17789f551 Mon Sep 17 00:00:00 2001 From: Paul Meyer <49727155+katexochen@users.noreply.github.com> Date: Mon, 20 Mar 2023 11:07:16 +0100 Subject: [PATCH] go: remove superfluous else block Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com> --- debugd/internal/debugd/metadata/scheduler.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/debugd/internal/debugd/metadata/scheduler.go b/debugd/internal/debugd/metadata/scheduler.go index 0687cfb85..1dfbdabd1 100644 --- a/debugd/internal/debugd/metadata/scheduler.go +++ b/debugd/internal/debugd/metadata/scheduler.go @@ -55,12 +55,11 @@ func (s *Scheduler) Start(ctx context.Context, wg *sync.WaitGroup) { if err != nil { s.log.With(zap.Error(err)).Warnf("Discovering debugd IPs failed") continue - } else { - s.log.With(zap.Strings("ips", ips)).Infof("Discovered instances") - s.download(ctx, ips) - if s.deploymentDone && s.infoDone { - return - } + } + s.log.With(zap.Strings("ips", ips)).Infof("Discovered instances") + s.download(ctx, ips) + if s.deploymentDone && s.infoDone { + return } select {