Documentation
¶
Overview ¶
Package fatihcolor provides an adapter between fatih/color and neilotoole/jsoncolor's native mechanism. See ToCoreColors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToCoreColor ¶
ToCoreColor creates a jsoncolor.Color instance from a fatih/color instance.
func ToCoreColors ¶
ToCoreColors converts clrs to a core jsoncolor.Colors instance.
Types ¶
type Colors ¶
type Colors struct { // Bool is the color for boolean values. Bool *color.Color // Bytes is the color for byte / binary values. Bytes *color.Color // Datetime is the color for time-related values. Datetime *color.Color // Null is the color for null. Null *color.Color // Number is the color for number values, including int, // float, decimal etc. Number *color.Color // String is the color for string values. String *color.Color // Key is the color for keys such as a JSON field name. Key *color.Color // Punc is the color for punctuation such as colons, braces, etc. // Frequently Punc will just be color.Bold. Punc *color.Color // TextMarshaler is the color for types implementing encoding.TextMarshaler. TextMarshaler *color.Color }
Colors encapsulates JSON color output, using fatih/color elements. It can be converted to a jsoncolor.Colors using ToCoreColors.
Click to show internal directories.
Click to hide internal directories.