Versions in this module Expand all Collapse all v0 v0.2.0 Jul 29, 2026 v0.1.0 Jul 29, 2026 Changes in this version + func Extract(htmlBytes []byte, dst any, opts ...Option) error + type Attempt struct + Matched int + NonEmpty int + Selector string + Source string + type CoverageReport struct + Fields []FieldCoverage + Pages int + func Aggregate(reports ...Report) CoverageReport + type Document struct + func Parse(b []byte) (*Document, error) + func (d *Document) Extract(dst any, opts ...Option) error + type ExpectError struct + Attempts []Attempt + Spec string + func (e *ExpectError) Error() string + type Field struct + Children map[string]Field + List bool + Optional bool + Spec string + func (f *Field) UnmarshalYAML(node *yaml.Node) error + type FieldCoverage struct + Degraded int + Field string + Matched int + MaxCount int + MinCount int + Optional bool + Pages int + TotalCount int + WonBy []int + func (c FieldCoverage) MatchRate() float64 + type FieldError struct + Attempts []Attempt + Field string + Spec string + func (e *FieldError) Error() string + type FieldStatus struct + AltIndex int + Attempts []Attempt + Count int + Err string + Field string + Matched bool + MissingIn int + Optional bool + Selector string + Spec string + type Option func(*config) + func Lenient() Option + type Report struct + Expect *FieldStatus + Fields []FieldStatus + func (r Report) Degraded() []string + func (r Report) Missing() []string + func (r Report) OK() bool + type Schema struct + Expect string + Fields map[string]Field + func LoadSchema(b []byte) (Schema, error) + func (s Schema) Check(htmlBytes []byte) Report + func (s Schema) CheckDocument(d *Document) Report + func (s Schema) Extract(htmlBytes []byte, opts ...Option) (map[string]any, error) + func (s Schema) ExtractDocument(d *Document, opts ...Option) (map[string]any, error) + func (s Schema) Merge(patch Schema) Schema + func (s Schema) Validate() error