Versions in this module Expand all Collapse all v0 v0.1.0 Aug 14, 2026 Changes in this version + var ErrNoHunks = errors.New("hunkpatch: no hunk found in diff") + func Apply(source, diff string) (string, error) + func ApplyHunk(content string, hunk []string) (string, bool) + func ApplyHunkWith(content string, hunk []string, opts Options) (string, bool) + type FileDiff struct + Hunks [][]string + NewFileName string + OldFileName string + func FindDiffs(content string) []FileDiff + type Options struct + IndentTolerant bool + type PartialError struct + Applied int + Skipped [][]string + Total int + func (e *PartialError) Error() string + type Result struct + Applied int + Skipped [][]string + Text string + Total int + func ApplyWith(source, diff string, opts Options) (Result, error)