From 978d35d356e8752bdd272884df48a6289d88b40a Mon Sep 17 00:00:00 2001 From: Moritz Poldrack Date: Sun, 31 Jul 2022 14:32:48 +0200 Subject: lint: homogenize operations and minor fixes (gocritic) Apply GoDoc comment policy (comments for humans should have a space after the //; machine-readable comments shouldn't) Use strings.ReplaceAll instead of strings.Replace when appropriate Remove if/else chains by replacing them with switches Use short assignment/increment notation Replace single case switches with if statements Combine else and if when appropriate Signed-off-by: Moritz Poldrack Acked-by: Robin Jarry --- commands/account/rmdir.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'commands/account/rmdir.go') diff --git a/commands/account/rmdir.go b/commands/account/rmdir.go index be493777..e45a7a7a 100644 --- a/commands/account/rmdir.go +++ b/commands/account/rmdir.go @@ -37,8 +37,7 @@ func (RemoveDir) Execute(aerc *widgets.Aerc, args []string) error { return err } for _, opt := range opts { - switch opt.Option { - case 'f': + if opt.Option == 'f' { force = true } } -- cgit