aerc/worker/imap/remove.go
Moritz Poldrack e30bd324a3 go vet: composite literal uses unkeyed fields
This commit fixes all occurrences of the abovementioned lint-error in
the codebase.

Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
2022-03-18 13:33:16 +01:00

19 lines
426 B
Go

package imap
import (
"git.sr.ht/~rjarry/aerc/worker/types"
)
func (imapw *IMAPWorker) handleRemoveDirectory(msg *types.RemoveDirectory) {
if err := imapw.client.Delete(msg.Directory); err != nil {
if msg.Quiet {
return
}
imapw.worker.PostMessage(&types.Error{
Message: types.RespondTo(msg),
Error: err,
}, nil)
} else {
imapw.worker.PostMessage(&types.Done{Message: types.RespondTo(msg)}, nil)
}
}