v0.8.0
What's new in v0.8.0
New package: htmlctest
The htmlctest package provides a fluent testing API for htmlc components.
It replaces the previous free-function API with a composable, discoverable design:
Harness— entry point for building a test environment. UseNewHarnessorBuildto create one,Withto lazily register components, andPage/Fragmentto render them.Result— holds a rendered HTML output. Parses lazily withDocument(), supports tree-diffing assertions viaAssertHTML, and returns aSelectionviaFind(Query).Query— immutable value type for describing element searches. Combine withWithClass,WithAttr, andDescendantto narrow selectors.Selection— fluent assertion chain over matched elements. Methods includeAssertExists,AssertNotExists,Count,Text,Attr,Nodes, andCheck(with aSelectionCheckerinterface for custom assertions).
Migration stubs in stubs.go preserve source compatibility and emit t.Fatalf messages with replacement instructions for callers of the old API.
Improved struct property handling
StructProps now uses a two-pass key enumeration algorithm: direct (non-anonymous) fields are collected first, followed by anonymous embedded fields. The first-rune-lowercase alias is a lookup-only affordance and is intentionally excluded from Keys() to avoid double-exposure. Nil pointer chains are handled safely — newStructProps dereferences any chain of pointers and returns false on nil.
Dependency promotion
golang.org/x/net/html is promoted from an indirect to a direct dependency, used by htmlctest for HTML parsing.