Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Diff ¶
Diff is the collection of DiffFiles
type DiffFile ¶
type DiffFile struct { DiffHeader string Mode FileMode OrigName string NewName string Hunks []*DiffHunk }
DiffFile is the sum of diffhunks and holds the changes of the file features
type DiffHunk ¶
type DiffHunk struct { HunkHeader string OrigRange DiffRange NewRange DiffRange WholeRange DiffRange }
DiffHunk is a group of difflines
type DiffLine ¶
type DiffLine struct { Mode DiffLineMode Number int Content string Position int // the line in the diff }
DiffLine is the least part of an actual diff
type DiffLineMode ¶
type DiffLineMode rune
DiffLineMode tells the line if added, removed or unchanged
const ( // ADDED if the line is added (shown green in diff) ADDED DiffLineMode = iota // REMOVED if the line is deleted (shown red in diff) REMOVED // UNCHANGED if the line is unchanged (not colored in diff) UNCHANGED )
Click to show internal directories.
Click to hide internal directories.