query -> doc

This commit is contained in:
Kirill Zhuravlev 2023-02-15 02:32:24 +01:00 committed by Avelino
parent 4dd74a2b02
commit 8353845a8c
No known key found for this signature in database
GPG Key ID: B345B4D52E98180A

View File

@ -156,13 +156,13 @@ func renderCategories(categories map[string]Category) error {
// Sanitize HTML. This is not necessary, but allows to have content // Sanitize HTML. This is not necessary, but allows to have content
// of all html files in same style. // of all html files in same style.
{ {
query, err := goquery.NewDocumentFromReader(buf) doc, err := goquery.NewDocumentFromReader(buf)
if err != nil { if err != nil {
// FIXME: remove `unable to` from all fmt.Errorf // FIXME: remove `unable to` from all fmt.Errorf
return fmt.Errorf("unable to create goquery instance for `%s`: %w", categoryDir, err) return fmt.Errorf("unable to create goquery instance for `%s`: %w", categoryDir, err)
} }
html, err := query.Html() html, err := doc.Html()
if err != nil { if err != nil {
return fmt.Errorf("unable to render goquery html for `%s`: %w", categoryDir, err) return fmt.Errorf("unable to render goquery html for `%s`: %w", categoryDir, err)
} }