Versions in this module Expand all Collapse all v1 v1.0.1 Jun 12, 2026 v1.0.0 Jun 9, 2026 Changes in this version + var ErrNilDocument = errors.New("diff: nil document") + var ErrSemanticNotImplemented = errors.New(...) + var ErrUnknownFormat = errors.New("diff: unknown format") + func DiffLexical(prev, curr string) string + func DiffWithLayer(prev, curr *model.Document, layer Layer) (*ChangeSet, []LexicalSectionDiff, error) + type CellDelta struct + Abs *float64 + Curr *float64 + Pct *float64 + Period string + Prev *float64 + type ChangeKind string + const Added + const Changed + const Removed + const Unchanged + type ChangeSet struct + Curr FilingRef + Prev FilingRef + SchemaVersion string + Sections []SectionDiff + Statements []StatementDiff + func Diff(prev, curr *model.Document) (*ChangeSet, error) + type FilingRef struct + Accession string + Company string + FilingDate string + Form string + PeriodEnd string + Ticker string + type JSON struct + func (JSON) Render(cs *ChangeSet, w io.Writer) error + type Layer string + const LayerLexical + const LayerSemantic + const LayerStructural + type LexicalParagraph struct + Text string + type LexicalRenderer struct + func (LexicalRenderer) Render(cs *ChangeSet, lexical []LexicalSectionDiff, w io.Writer) error + type LexicalSectionDiff struct + Item string + Paragraphs []LexicalParagraph + Title string + func DiffLexicalSections(cs *ChangeSet, prev, curr []string) []LexicalSectionDiff + type Markdown struct + func (Markdown) Render(cs *ChangeSet, w io.Writer) error + type ParagraphChange struct + Kind ChangeKind + Text string + type Renderer interface + Render func(cs *ChangeSet, w io.Writer) error + func RendererFor(format string) (Renderer, error) + type RowDelta struct + Cells []CellDelta + Concept string + Label string + Status ChangeKind + type SectionDiff struct + Item string + Paragraphs []ParagraphChange + Title string + type StatementDiff struct + Periods []string + RoleURI string + Rows []RowDelta + Title string