From ef599aa8fc9faf2747d3ec9fb02fb7b80af27cc6 Mon Sep 17 00:00:00 2001 From: Moritz Poldrack Date: Fri, 29 Jul 2022 21:42:02 +0200 Subject: 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 Acked-by: Robin Jarry --- commands/mode/noquit.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'commands/mode/noquit.go') diff --git a/commands/mode/noquit.go b/commands/mode/noquit.go index ad664165..92f83ee8 100644 --- a/commands/mode/noquit.go +++ b/commands/mode/noquit.go @@ -19,8 +19,5 @@ func NoQuitDone() { // QuitAllowed checks if aerc can exit normally (only when all goroutines that // requested a no-quit mode were done and called the NoQuitDone() function) func QuitAllowed() bool { - if atomic.LoadInt32(&noquit) > 0 { - return false - } - return true + return atomic.LoadInt32(&noquit) <= 0 } -- cgit