Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ThemeDefault = func(t Type) []gop.Style { switch t { case AddSymbol: return []gop.Style{gop.Green} case DelSymbol: return []gop.Style{gop.Red} case AddWords: return []gop.Style{gop.Green} case DelWords: return []gop.Style{gop.Red} case ChunkStart: return []gop.Style{gop.Black, gop.BgMagenta} } return []gop.Style{gop.None} }
ThemeDefault colors for Sprint
ThemeNone colors for Sprint
Functions ¶
func TokenizeLine ¶
TokenizeLine two different lines
Types ¶
type Token ¶
Token presents a symbol in diff layout
func SpreadTokenLines ¶ added in v0.23.2
SpreadTokenLines to tokens
type TokenLine ¶ added in v0.23.2
TokenLine of tokens
func ParseTokenLines ¶ added in v0.23.2
ParseTokenLines of tokens
type Type ¶
type Type int
Type of token
const ( // Newline type Newline Type = iota // Space type Space // 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.