diff options
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/account.go | 2 | ||||
-rw-r--r-- | widgets/aerc.go | 2 | ||||
-rw-r--r-- | widgets/compose.go | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/widgets/account.go b/widgets/account.go index 4f25f77a..ceb8d98e 100644 --- a/widgets/account.go +++ b/widgets/account.go @@ -404,7 +404,7 @@ func (acct *AccountView) GetSortCriteria() []*types.SortCriterion { } criteria, err := sort.GetSortCriteria(acct.UiConfig().Sort) if err != nil { - acct.PushError(fmt.Errorf("ui sort: %v", err)) + acct.PushError(fmt.Errorf("ui sort: %w", err)) return nil } return criteria diff --git a/widgets/aerc.go b/widgets/aerc.go index fbbf2aa8..2383973a 100644 --- a/widgets/aerc.go +++ b/widgets/aerc.go @@ -536,7 +536,7 @@ func (aerc *Aerc) Mailto(addr *url.URL) error { h := &mail.Header{} to, err := mail.ParseAddressList(addr.Opaque) if err != nil && addr.Opaque != "" { - return fmt.Errorf("Could not parse to: %v", err) + return fmt.Errorf("Could not parse to: %w", err) } h.SetAddressList("to", to) for key, vals := range addr.Query() { diff --git a/widgets/compose.go b/widgets/compose.go index 30584294..670f4f2a 100644 --- a/widgets/compose.go +++ b/widgets/compose.go @@ -202,7 +202,7 @@ func (c *Composer) SetAttachKey(attach bool) error { if found { err := c.DeleteAttachment(name) if err != nil { - return fmt.Errorf("failed to delete attachment '%s: %v", name, err) + return fmt.Errorf("failed to delete attachment '%s: %w", name, err) } } else { attach = !attach @@ -259,7 +259,7 @@ func (c *Composer) SetSign(sign bool) error { err := c.updateCrypto() if err != nil { c.sign = !sign - return fmt.Errorf("Cannot sign message: %v", err) + return fmt.Errorf("Cannot sign message: %w", err) } return nil } @@ -403,7 +403,7 @@ func (c *Composer) AddTemplate(template string, data interface{}) error { mr, err := mail.CreateReader(templateText) if err != nil { - return fmt.Errorf("Template loading failed: %v", err) + return fmt.Errorf("Template loading failed: %w", err) } // copy the headers contained in the template to the compose headers @@ -414,7 +414,7 @@ func (c *Composer) AddTemplate(template string, data interface{}) error { part, err := mr.NextPart() if err != nil { - return fmt.Errorf("Could not get body of template: %v", err) + return fmt.Errorf("Could not get body of template: %w", err) } c.AppendContents(part.Body) |