Documentation
¶
Index ¶
- func BuildHunkPatch(parsed ParsedDiff, hunkIndex int) (string, error)
- func BuildLineRangePatch(parsed ParsedDiff, startChanged, endChanged int) (string, error)
- func BuildRawToDisplayMap(parsed ParsedDiff, displayToRaw []int) []int
- func BuildSingleLinePatch(parsed ParsedDiff, changedIndex int) (string, error)
- func HasBinaryDiff(parsed ParsedDiff) bool
- type ChangedLine
- type ParsedDiff
- type ParsedHunk
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildHunkPatch ¶
func BuildHunkPatch(parsed ParsedDiff, hunkIndex int) (string, error)
func BuildLineRangePatch ¶
func BuildLineRangePatch(parsed ParsedDiff, startChanged, endChanged int) (string, error)
func BuildRawToDisplayMap ¶
func BuildRawToDisplayMap(parsed ParsedDiff, displayToRaw []int) []int
func BuildSingleLinePatch ¶
func BuildSingleLinePatch(parsed ParsedDiff, changedIndex int) (string, error)
func HasBinaryDiff ¶ added in v0.14.1
func HasBinaryDiff(parsed ParsedDiff) bool
Types ¶
type ChangedLine ¶
type ParsedDiff ¶
type ParsedDiff struct {
FileHeader []string
Lines []string
Hunks []ParsedHunk
Changed []ChangedLine
}
func ParseUnifiedDiff ¶
func ParseUnifiedDiff(raw string) ParsedDiff
Click to show internal directories.
Click to hide internal directories.