about summary refs log tree commit diff stats
path: root/internal/builder/template.go
diff options
context:
space:
mode:
authorAlan Pearce2024-11-28 15:12:00 +0100
committerAlan Pearce2024-11-28 15:12:00 +0100
commitb94f66cfe5bf87ec6d2a32448ca5c55ba118c7aa (patch)
treeeb6f951b3a0959c6ace7be6f111124791e90c54d /internal/builder/template.go
parent183b0c8b5edbcf4224d4dd3905ca483204522656 (diff)
downloadwebsite-b94f66cfe5bf87ec6d2a32448ca5c55ba118c7aa.tar.lz
website-b94f66cfe5bf87ec6d2a32448ca5c55ba118c7aa.tar.zst
website-b94f66cfe5bf87ec6d2a32448ca5c55ba118c7aa.zip
Use errors.WithMessage in place of .Wrap
Diffstat (limited to 'internal/builder/template.go')
-rw-r--r--internal/builder/template.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/builder/template.go b/internal/builder/template.go
index 9f019df..c318107 100644
--- a/internal/builder/template.go
+++ b/internal/builder/template.go
@@ -47,7 +47,7 @@ type QueryDocument struct {
 func NewDocumentFromReader(r io.Reader) (*QueryDocument, error) {
 	doc, err := goquery.NewDocumentFromReader(r)
 
-	return &QueryDocument{doc}, errors.Wrap(err, "could not create query document")
+	return &QueryDocument{doc}, errors.WithMessage(err, "could not create query document")
 }
 
 func (q *QueryDocument) Find(selector string) *QuerySelection {
@@ -148,7 +148,7 @@ func getFeedStylesHash(r io.Reader) (string, error) {
 	}
 	expr, err := xpath.CompileWithNS("//xhtml:style", nsMap)
 	if err != nil {
-		return "", errors.Wrap(err, "could not parse XPath")
+		return "", errors.WithMessage(err, "could not parse XPath")
 	}
 	style := xmlquery.QuerySelector(doc, expr)