aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorMoritz Poldrack <git@moritz.sh>2022-07-29 21:42:02 +0200
committerRobin Jarry <robin@jarry.cc>2022-08-04 21:57:52 +0200
commitef599aa8fc9faf2747d3ec9fb02fb7b80af27cc6 (patch)
tree83b3757f85dc336a8f3bef89f03b96c6970c0119 /widgets
parent03f9f4c3ab633f3b567813b55b90ba9aac604e3e (diff)
downloadaerc-ef599aa8fc9faf2747d3ec9fb02fb7b80af27cc6.tar.gz
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>
Diffstat (limited to 'widgets')
-rw-r--r--widgets/account-wizard.go2
-rw-r--r--widgets/dirtree.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/widgets/account-wizard.go b/widgets/account-wizard.go
index 57032884..9ddecfb0 100644
--- a/widgets/account-wizard.go
+++ b/widgets/account-wizard.go
@@ -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
diff --git a/widgets/dirtree.go b/widgets/dirtree.go
index f135a0c3..b28d8072 100644
--- a/widgets/dirtree.go
+++ b/widgets/dirtree.go
@@ -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 {