Documentation
¶
Overview ¶
Package color provides configuration for coloring for unified diffs using ANSI escape sequences.
Specifying colors uses [Select Graphic Rendition parameters]. For example the code below, presents the header in bold yellow:
HunkHeader(1, 33)
This is equivalent to the following raw ANSI sequence: \033[1;33m.
It's the responsibility of the caller to ensure that the parameters are correct and supported by the underlying terminal.
[Select Graphic Rendition parameters]: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*config.ColorConfig)
A Option makes it possible to configure custom colors in [textdiff.TerminalColors].
[textdiff.TerminalColors]: https://pkg.go.dev/znkr.io/diff/textdiff#TerminalColors
func HunkHeaders ¶
HunkHeaders colors hunk headers, the "@@ ... @@" part of the unified diff.