all repos — homestead @ 2ea9b6cc0c1249f062d2d01c46a280c51f6b9769

Code for my website

Use errors.WithMessage in place of .Wrap

Alan Pearce
commit

2ea9b6cc0c1249f062d2d01c46a280c51f6b9769

parent

5c9eb456d14c37acfb1294425f607810ddebb302

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)