all: use fmt.Errorf for fomartting errors

Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
This commit is contained in:
Wagner Riffel 2019-09-03 16:34:04 -03:00 committed by Drew DeVault
parent 6838c23478
commit feacca3c5c
10 changed files with 10 additions and 15 deletions
commands

View file

@ -34,7 +34,7 @@ func (ChangeTab) Complete(aerc *widgets.Aerc, args []string) []string {
func (ChangeTab) Execute(aerc *widgets.Aerc, args []string) error {
if len(args) != 2 {
return errors.New(fmt.Sprintf("Usage: %s <tab>", args[0]))
return fmt.Errorf("Usage: %s <tab>", args[0])
}
if args[1] == "-" {
ok := aerc.SelectPreviousTab()