package
0.8.1
Repository: https://github.com/bluekeyes/go-gitdiff.git
Documentation: pkg.go.dev

# Functions

Apply applies the changes in f to src, writing the result to dst.
NewBinaryApplier creates an BinaryApplier that reads data from src and writes modified data to dst.
NewTextApplier creates a TextApplier that reads data from src and writes modified data to dst.
Parse parses a patch with changes to one or more files.
ParsePatchDate parses a patch date string.
ParsePatchHeader parses the preamble string returned by [Parse] into a PatchHeader.
ParsePatchIdentity parses a patch identity string.
WithSubjectCleanMode sets the SubjectCleanMode for header parsing.

# Constants

BinaryPatchDelta indicates the data uses Git's packfile encoding.
BinaryPatchLiteral indicates the data is the exact file content.
OpAdd indicates an added line.
OpContext indicates a context line.
OpDelete indicates a deleted line.
SubjectCleanAll removes leading and trailing whitespace, leading "Re:", "re:", and ":" strings, and leading strings enclosed by '[' and ']'.
SubjectCleanPatchOnly is the same as SubjectCleanAll, but only removes leading strings enclosed by '[' and ']' if they start with "PATCH".
SubjectCleanWhitespace removes leading and trailing whitespace.

# Structs

ApplyError wraps an error that occurs during patch application with additional location information, if it is available.
BinaryApplier applies binary changes described in a fragment to source data.
BinaryFragment describes changes to a binary file.
Conflict indicates an apply failed due to a conflict between the patch and the source content.
File describes changes to a single file.
Line is a line in a text fragment.
PatchHeader is a parsed version of the preamble content that appears before the first diff in a patch.
PatchIdentity identifies a person who authored or committed a patch.
TextApplier applies changes described in text fragments to source data.
TextFragment describes changed lines starting at a specific line in a text file.

# Interfaces

LineReaderAt is the interface that wraps the ReadLinesAt method.

# Type aliases

BinaryPatchMethod is the method used to create and apply the binary patch.
LineOp describes the type of a text fragment line: context, added, or removed.
A PatchHeaderOption modifies the behavior of ParsePatchHeader.
SubjectCleanMode controls how ParsePatchHeader cleans subject lines when parsing mail-formatted patches.