lint: simplify code (gosimple)
Replaces infinite for loops containing a select on a channel with a single case with a range over the channel. Removes redundant assignments to blank identifiers. Remove unnecessary guard clause around delete(). Remove `if condition { return true } return false` with return condition Signed-off-by: Moritz Poldrack <moritz@poldrack.dev> Acked-by: Robin Jarry <robin@jarry.cc>
This commit is contained in:
parent
03f9f4c3ab
commit
ef599aa8fc
6 changed files with 28 additions and 39 deletions
widgets
|
@ -194,7 +194,7 @@ func NewAccountWizard(conf *config.AercConfig, aerc *Aerc) *AccountWizard {
|
|||
}
|
||||
wizard.imapUri()
|
||||
}
|
||||
hostport, srv = getSRV(server, []string{"submission"})
|
||||
hostport, _ = getSRV(server, []string{"submission"})
|
||||
if hostport != "" {
|
||||
wizard.smtpServer.Set(hostport)
|
||||
wizard.smtpMode = SMTP_STARTTLS
|
||||
|
|
|
@ -385,7 +385,7 @@ func buildTree(node *types.Thread, stree [][]string, defaultUid uint32) {
|
|||
}
|
||||
sort.Strings(keys)
|
||||
for _, key := range keys {
|
||||
next, _ := m[key]
|
||||
next := m[key]
|
||||
var uid uint32 = defaultUid
|
||||
for _, testStr := range next {
|
||||
if len(testStr) == 1 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue