Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultTheme = func(t Type) gop.Color { switch t { case AddSymbol, AddLine: return gop.Green case DelSymbol, DelLine: return gop.Red } return gop.None }
DefaultTheme colors for Sprint
NoTheme colors for Sprint
Functions ¶
func TokenizeLine ¶
TokenizeLine two different lines
Types ¶
type Comparable ¶
type Comparable interface { // Hash for comparison Hash() []byte }
Comparable interface
type Line ¶
type Line struct {
// contains filtered or unexported fields
}
Line of a string for fast comparison.
type Token ¶
Token presents a symbol in diff layout
func TokenizeText ¶
TokenizeText text block a and b into diff tokens.
type Type ¶
type Type int
Type of token
const ( // LineNum type LineNum Type = iota // ChunkStart type ChunkStart // ChunkEnd type ChunkEnd // SameSymbol type SameSymbol // SameLine type SameLine // AddSymbol type AddSymbol // AddLine type AddLine // DelSymbol typ DelSymbol // DelLine type DelLine // SameWords type SameWords // AddWords type AddWords // DelWords type DelWords // EmptyLine type EmptyLine )
Click to show internal directories.
Click to hide internal directories.