aboutsummaryrefslogtreecommitdiffstats
path: root/commands/compose
diff options
context:
space:
mode:
authorReto Brunner <reto@labrat.space>2021-01-30 13:51:32 +0100
committerReto Brunner <reto@labrat.space>2021-01-30 14:04:23 +0100
commit8ea86cea41aa038a25a8fee9cd540a7336869dae (patch)
tree11970859b928dfa06203962b58941e889295edc0 /commands/compose
parent949781fa0a5f0654112b4f78558347ca991a89d3 (diff)
downloadaerc-8ea86cea41aa038a25a8fee9cd540a7336869dae.tar.gz
Get rid of the aerc.PushError(" " + $string) idiom
The individual callers should not be responsible for padding
Diffstat (limited to 'commands/compose')
-rw-r--r--commands/compose/attach.go4
-rw-r--r--commands/compose/postpone.go4
2 files changed, 4 insertions, 4 deletions
diff --git a/commands/compose/attach.go b/commands/compose/attach.go
index 148442b0..37f49dfa 100644
--- a/commands/compose/attach.go
+++ b/commands/compose/attach.go
@@ -34,13 +34,13 @@ func (Attach) Execute(aerc *widgets.Aerc, args []string) error {
path, err := homedir.Expand(path)
if err != nil {
- aerc.PushError(" " + err.Error())
+ aerc.PushError(err.Error())
return err
}
pathinfo, err := os.Stat(path)
if err != nil {
- aerc.PushError(" " + err.Error())
+ aerc.PushError(err.Error())
return err
} else if pathinfo.IsDir() {
aerc.PushError("Attachment must be a file, not a directory")
diff --git a/commands/compose/postpone.go b/commands/compose/postpone.go
index 365b683f..6d6c8e78 100644
--- a/commands/compose/postpone.go
+++ b/commands/compose/postpone.go
@@ -63,7 +63,7 @@ func (Postpone) Execute(aerc *widgets.Aerc, args []string) error {
go func() {
errStr := <-errChan
if errStr != "" {
- aerc.PushError(" " + errStr)
+ aerc.PushError(errStr)
return
}
@@ -90,7 +90,7 @@ func (Postpone) Execute(aerc *widgets.Aerc, args []string) error {
r.Close()
composer.Close()
case *types.Error:
- aerc.PushError(" " + msg.Error.Error())
+ aerc.PushError(msg.Error.Error())
r.Close()
composer.Close()
}