Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UnescapeChars ¶
UnescapeChars reverses escaped characters.
Types ¶
type File ¶
type File struct { // The name and path of the file. Path string // The old name and path of the file. OldPath string // The type of the file. Type FileType // The index (SHA1 hash) of the file. For a changed/new file, it is the new SHA, // and for a deleted file it becomes "000000". SHA string // OldSHA is the old index (SHA1 hash) of the file. OldSHA string // The sections in the file. Sections []*Section IsBinary bool IsSubmodule bool Patch bytes.Buffer // contains filtered or unexported fields }
File represents a file in diff.
func (*File) NumAdditions ¶
NumAdditions returns the number of additions in the file.
func (*File) NumChanges ¶
NumChanges returns the number of additions and deletions in the file.
func (*File) NumDeletions ¶
NumDeletions returns the number of deletions in the file.
func (*File) NumSections ¶
NumSections returns the number of sections in the file.
type Line ¶
type Line struct { Type LineType // The type of the line Content string // The content of the line LeftLine int // The left line number RightLine int // The right line number }
Line represents a line in diff.
type Parser ¶
Click to show internal directories.
Click to hide internal directories.