Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Failure ¶
Failure records a patch that could not be applied, with why — never silently dropped. A pointer that no longer resolves (e.g. the doc was hand-edited) surfaces here so a human can reconcile it.
func Apply ¶
func Apply(publishedRaw []byte, patches []patch.Patch) (result []byte, applied []patch.Patch, failed []Failure, err error)
Apply executes patches against the PUBLISHED document bytes (the original, not the canonical form) so human-written prose and formatting are preserved and the resulting diff stays minimal. It returns the edited bytes plus which patches applied and which failed. A failing patch does not abort the rest — partial success is the contract.
Click to show internal directories.
Click to hide internal directories.