Documentation
¶
Index ¶
- func ApplyCharacterWarping(input string) string
- func ApplyColorPattern(input string, pattern string, method ...ColorizeStyle) string
- func ApplyColors(input string, patternValues []int, method ...ColorizeStyle) string
- func CompileColorPatterns()
- func DeleteColorPattern(name string) error
- func GetAllColorPatterns() map[string][]int
- func GetColorPatternNames() []string
- func GetMemoryUsage() map[string]util.MemoryResult
- func IsValidPattern(pName string) bool
- func LoadColorPatterns()
- func SaveColorPattern(name string, colors []int) error
- type ColorizeStyle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyCharacterWarping ¶ added in v0.9.8
func ApplyColorPattern ¶
func ApplyColorPattern(input string, pattern string, method ...ColorizeStyle) string
func ApplyColors ¶
func ApplyColors(input string, patternValues []int, method ...ColorizeStyle) string
func CompileColorPatterns ¶
func CompileColorPatterns()
func DeleteColorPattern ¶ added in v0.9.8
DeleteColorPattern removes a named color pattern from memory and persists the file.
func GetAllColorPatterns ¶ added in v0.9.8
GetAllColorPatterns returns a copy of all loaded color patterns (name → ANSI codes).
func GetColorPatternNames ¶
func GetColorPatternNames() []string
func GetMemoryUsage ¶ added in v0.9.8
func GetMemoryUsage() map[string]util.MemoryResult
func IsValidPattern ¶
func LoadColorPatterns ¶
func LoadColorPatterns()
func SaveColorPattern ¶ added in v0.9.8
SaveColorPattern adds or replaces a named color pattern in memory and persists the file.
Types ¶
type ColorizeStyle ¶
type ColorizeStyle uint8
TODO: Load patterns from a config file.
var ( Default ColorizeStyle = 0 Words ColorizeStyle = 1 Once ColorizeStyle = 2 Stretch ColorizeStyle = 3 // Short tags ShortTagPatterns = map[string][]string{} )
Click to show internal directories.
Click to hide internal directories.