Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GooKitColorTag = map[Tag]string{ OpenDeletedLine: "", CloseDeletedLine: "\n", OpenDeletedModified: "<fg=black;bg=red;>", CloseDeletedModified: "</>", OpenDeletedNotModified: "<red>", CloseDeletedNotModified: "</>", OpenInsertedLine: "", CloseInsertedLine: "\n", OpenInsertedModified: "<fg=black;bg=green;>", CloseInsertedModified: "</>", OpenInsertedNotModified: "<green>", CloseInsertedNotModified: "</>", OpenKeepLine: "", CloseKeepLine: "\n", OpenSection: "<cyan>", CloseSection: "</>\n", OpenHeader: "", CloseHeader: "\n", }
GooKitColorTag is a theme for Result.Format() method for coloring console
View Source
var GooKitColorTheme = map[Tag]color.Style{ OpenDeletedLine: nil, OpenDeletedModified: color.New(color.FgBlack, color.BgRed), OpenDeletedNotModified: color.New(color.Red), OpenInsertedLine: nil, OpenInsertedModified: color.New(color.FgBlack, color.BgGreen), OpenInsertedNotModified: color.New(color.Green), OpenKeepLine: nil, OpenSection: color.New(color.Cyan), OpenHeader: nil, }
GooKitColorTheme is a theme for Result.Format() method for coloring console
View Source
var HTMLTag = map[Tag]string{ OpenDeletedLine: `<div style="background-color: #ffecec;">`, CloseDeletedLine: `</div>`, OpenDeletedModified: `<span style="background-color: #f8cbcb;">`, CloseDeletedModified: `</span>`, OpenDeletedNotModified: "", CloseDeletedNotModified: "", OpenInsertedLine: `<div style="background-color: #eaffea;">`, CloseInsertedLine: `</div>`, OpenInsertedModified: `<span style="background-color: #a6f3a6;">`, CloseInsertedModified: `</span>`, OpenInsertedNotModified: "", CloseInsertedNotModified: "", OpenKeepLine: `<div style="background-color: #ffffff;">`, CloseKeepLine: "</div>", }
HTMLTheme is a theme for Result.Format() method for generating HTML
Functions ¶
This section is empty.
Types ¶
type Result ¶
type Result struct {
Lines []Line
}
Result contains diff result
func (Result) UnifiedWithGooKitColor ¶ added in v0.1.1
type Tag ¶
type Tag int
Tag is for formatting text
const ( OpenDeletedLine Tag = iota + 1 CloseDeletedLine OpenDeletedModified CloseDeletedModified OpenDeletedNotModified CloseDeletedNotModified OpenInsertedLine CloseInsertedLine OpenInsertedModified CloseInsertedModified OpenInsertedNotModified CloseInsertedNotModified OpenKeepLine CloseKeepLine OpenSection CloseSection OpenHeader CloseHeader )
Click to show internal directories.
Click to hide internal directories.