diff options
Diffstat (limited to 'internal/builder')
-rw-r--r-- | internal/builder/builder.go | 4 | ||||
-rw-r--r-- | internal/builder/template.go | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/internal/builder/builder.go b/internal/builder/builder.go index b99d919..bb39c43 100644 --- a/internal/builder/builder.go +++ b/internal/builder/builder.go @@ -12,9 +12,9 @@ import ( "go.alanpearce.eu/website/internal/config" "go.alanpearce.eu/website/internal/content" - "go.alanpearce.eu/x/log" "go.alanpearce.eu/website/internal/sitemap" "go.alanpearce.eu/website/templates" + "go.alanpearce.eu/x/log" "github.com/a-h/templ" mapset "github.com/deckarep/golang-set/v2" @@ -36,7 +36,7 @@ var compressFiles = false func mkdirp(dirs ...string) error { err := os.MkdirAll(path.Join(dirs...), 0755) - return errors.Wrap(err, "could not create directory") + return errors.WithMessage(err, "could not create directory") } func outputToFile(output io.Reader, pathParts ...string) error { 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) |