From f70eecc7cbe0a5d0641503259813e67beadebf8d Mon Sep 17 00:00:00 2001 From: Moritz Poldrack Date: Fri, 29 Jul 2022 21:05:12 +0200 Subject: [PATCH] lint: remove empty branches (SA9003) Empty branches are effectively dead code and should therefore be removed. Signed-off-by: Moritz Poldrack Acked-by: Robin Jarry --- worker/imap/connect.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/worker/imap/connect.go b/worker/imap/connect.go index bfd95d8..35fd9b1 100644 --- a/worker/imap/connect.go +++ b/worker/imap/connect.go @@ -70,10 +70,10 @@ func (w *IMAPWorker) connect() (*client.Client, error) { if w.config.user != nil { username := w.config.user.Username() - password, hasPassword := w.config.user.Password() - if !hasPassword { - // TODO: ask password - } + + // TODO: 2nd parameter false if no password is set. ask for it + // if unset. + password, _ := w.config.user.Password() if w.config.oauthBearer.Enabled { if err := w.config.oauthBearer.Authenticate(