all repos — website @ b94f66cfe5bf87ec6d2a32448ca5c55ba118c7aa

My website

Use errors.WithMessage in place of .Wrap

Alan Pearce
commit

b94f66cfe5bf87ec6d2a32448ca5c55ba118c7aa

parent

183b0c8b5edbcf4224d4dd3905ca483204522656

1 file changed, 2 insertions(+), 2 deletions(-)

changed files
M internal/builder/template.gointernal/builder/template.go
@@ -47,7 +47,7 @@
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 @@ return "", err
} 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)