diff options
author | Wagner Riffel <wgrriffel@gmail.com> | 2019-09-03 16:34:04 -0300 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-09-04 16:30:57 -1000 |
commit | feacca3c5caffb11be1f5f7cbfef01400b5bc944 (patch) | |
tree | 7f54b1affcfc2d905613de9e00b95ab4cba45a77 /commands/msgview | |
parent | 6838c23478944a9b45df1fa9a0f432ec77423987 (diff) | |
download | aerc-feacca3c5caffb11be1f5f7cbfef01400b5bc944.tar.gz |
all: use fmt.Errorf for fomartting errors
Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
Diffstat (limited to 'commands/msgview')
-rw-r--r-- | commands/msgview/next-part.go | 3 | ||||
-rw-r--r-- | commands/msgview/toggle-headers.go | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/commands/msgview/next-part.go b/commands/msgview/next-part.go index c9423cc9..a98e96a7 100644 --- a/commands/msgview/next-part.go +++ b/commands/msgview/next-part.go @@ -1,7 +1,6 @@ package msgview import ( - "errors" "fmt" "strconv" @@ -48,5 +47,5 @@ func (NextPrevPart) Execute(aerc *widgets.Aerc, args []string) error { } func nextPrevPartUsage(cmd string) error { - return errors.New(fmt.Sprintf("Usage: %s [n]", cmd)) + return fmt.Errorf("Usage: %s [n]", cmd) } diff --git a/commands/msgview/toggle-headers.go b/commands/msgview/toggle-headers.go index f13e27d1..e777d9be 100644 --- a/commands/msgview/toggle-headers.go +++ b/commands/msgview/toggle-headers.go @@ -1,7 +1,6 @@ package msgview import ( - "errors" "fmt" "git.sr.ht/~sircmpwn/aerc/widgets" @@ -31,5 +30,5 @@ func (ToggleHeaders) Execute(aerc *widgets.Aerc, args []string) error { } func toggleHeadersUsage(cmd string) error { - return errors.New(fmt.Sprintf("Usage: %s", cmd)) + return fmt.Errorf("Usage: %s", cmd) } |