From 8ea86cea41aa038a25a8fee9cd540a7336869dae Mon Sep 17 00:00:00 2001 From: Reto Brunner Date: Sat, 30 Jan 2021 13:51:32 +0100 Subject: Get rid of the aerc.PushError(" " + $string) idiom The individual callers should not be responsible for padding --- commands/account/mkdir.go | 2 +- commands/account/rmdir.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'commands/account') diff --git a/commands/account/mkdir.go b/commands/account/mkdir.go index 4352a42..d3a6226 100644 --- a/commands/account/mkdir.go +++ b/commands/account/mkdir.go @@ -40,7 +40,7 @@ func (MakeDir) Execute(aerc *widgets.Aerc, args []string) error { aerc.PushStatus("Directory created.", 10*time.Second) acct.Directories().Select(name) case *types.Error: - aerc.PushError(" " + msg.Error.Error()) + aerc.PushError(msg.Error.Error()) } }) return nil diff --git a/commands/account/rmdir.go b/commands/account/rmdir.go index ed24ca5..9cd974f 100644 --- a/commands/account/rmdir.go +++ b/commands/account/rmdir.go @@ -86,7 +86,7 @@ func (RemoveDir) Execute(aerc *widgets.Aerc, args []string) error { case *types.Done: aerc.PushStatus("Directory removed.", 10*time.Second) case *types.Error: - aerc.PushError(" " + msg.Error.Error()) + aerc.PushError(msg.Error.Error()) case *types.Unsupported: aerc.PushError(":rmdir is not supported by the backend.") } -- cgit 1.4.1-2-gfad0