Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultColor = ColorName("default") Black = ColorName("black") Red = ColorName("red") Green = ColorName("green") Yellow = ColorName("yellow") Blue = ColorName("blue") Magenta = ColorName("magenta") Cyan = ColorName("cyan") White = ColorName("white") LightBlack = ColorName("lightBlack") LightRed = ColorName("lightRed") LightGreen = ColorName("lightGreen") LightYellow = ColorName("lightYellow") LightBlue = ColorName("lightBlue") LightMagenta = ColorName("lightMagenta") LightCyan = ColorName("lightCyan") LightWhite = ColorName("lightWhite") )
Colors
View Source
const ( // ColorTypeNone defines empty ColorTypeNone = ColorType("none") // ColorType8Bit defines 8-bit (256) colors ColorType8Bit = ColorType("8bit") // ColorType24Bit defines 24-bit (R: 8bit + G: 8bit + B: 8bit ; full) colors ColorType24Bit = ColorType("24bit") // ColorTypeName defines named colors ColorTypeName = ColorType("named") )
View Source
const ( // LabelTypeNone suppress line-labels LabelTypeNone = LabelType("none") // LabelTypeShort prints single-character line-label LabelTypeShort = LabelType("short") // LabelTypeLong prints text line-label LabelTypeLong = LabelType("long") )
View Source
const ( // Filename is filename of configurations for this app. Filename = ".richstyle" // LocalOnlyEnvName is the name of environment variable // to stop searching configuration files excepting current directory. LocalOnlyEnvName = "RICHGO_LOCAL" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Color ¶
type Color struct { Type ColorType Value8 uint8 ValueR uint8 ValueG uint8 ValueB uint8 Name ColorName }
Color is the color in the ANSI for configuration
func (Color) MarshalJSON ¶
MarshalJSON implements Marshaler
func (Color) MarshalYAML ¶ added in v0.2.3
MarshalYAML implements Marshaler
func (*Color) UnmarshalJSON ¶
UnmarshalJSON implements Unmarshaler
func (*Color) UnmarshalYAML ¶ added in v0.2.3
UnmarshalYAML implements Unmarshaler
type ColorName ¶
type ColorName string
ColorName is the name of ANSI-colors
func ColorNames ¶ added in v0.2.6
func ColorNames() []ColorName
ColorNames will get variations of the colors.
type Config ¶
type Config struct { LabelType *LabelType `json:"labelType,omitempty" yaml:"labelType,omitempty"` BuildStyle *Style `json:"buildStyle,omitempty" yaml:"buildStyle,omitempty"` StartStyle *Style `json:"startStyle,omitempty" yaml:"startStyle,omitempty"` PassStyle *Style `json:"passStyle,omitempty" yaml:"passStyle,omitempty"` FailStyle *Style `json:"failStyle,omitempty" yaml:"failStyle,omitempty"` SkipStyle *Style `json:"skipStyle,omitempty" yaml:"skipStyle,omitempty"` FileStyle *Style `json:"fileStyle,omitempty" yaml:"fileStyle,omitempty"` LineStyle *Style `json:"lineStyle,omitempty" yaml:"lineStyle,omitempty"` PassPackageStyle *Style `json:"passPackageStyle,omitempty" yaml:"passPackageStyle,omitempty"` FailPackageStyle *Style `json:"failPackageStyle,omitempty" yaml:"failPackageStyle,omitempty"` CoverThreshold *int `json:"coverThreshold,omitempty" yaml:"coverThreshold,omitempty"` CoveredStyle *Style `json:"coveredStyle,omitempty" yaml:"coveredStyle,omitempty"` UncoveredStyle *Style `json:"uncoveredStyle,omitempty" yaml:"uncoveredStyle,omitempty"` Removals []string `json:"removals,omitempty" yaml:"removals,omitempty"` LeaveTestPrefix *bool `json:"leaveTestPrefix,omitempty" yaml:"leaveTestPrefix,omitempty"` }
Config holds settings for richgo
type LabelType ¶
type LabelType string
LabelType is the type of line-labels
func LabelTypes ¶ added in v0.2.6
func LabelTypes() []LabelType
LabelTypes defines the possible values of LabelType
func (LabelType) MarshalJSON ¶
MarshalJSON implements Marshaler
func (*LabelType) UnmarshalJSON ¶
UnmarshalJSON implements Unmarshaler
type Style ¶
type Style struct { // Hide text Hide *bool `json:"hide,omitempty" yaml:"hide,omitempty"` // Bold set the text style to bold or increased intensity. Bold *bool `json:"bold,omitempty" yaml:"bold,omitempty"` // Faint set the text style to faint. Faint *bool `json:"faint,omitempty" yaml:"faint,omitempty"` // Italic set the text style to italic. Italic *bool `json:"italic,omitempty" yaml:"italic,omitempty"` // Underline set the text style to underline. Underline *bool `json:"underline,omitempty" yaml:"underline,omitempty"` // BlinkSlow set the text style to slow blink. BlinkSlow *bool `json:"blinkSlow,omitempty" yaml:"blinkSlow,omitempty"` // BlinkRapid set the text style to rapid blink. BlinkRapid *bool `json:"blinkRapid,omitempty" yaml:"blinkRapid,omitempty"` // Inverse swap the foreground color and background color. Inverse *bool `json:"inverse,omitempty" yaml:"inverse,omitempty"` // Conceal set the text style to conceal. Conceal *bool `json:"conceal,omitempty" yaml:"conceal,omitempty"` // CrossOut set the text style to crossed out. CrossOut *bool `json:"crossOut,omitempty" yaml:"crossOut,omitempty"` // Frame set the text style to framed. Frame *bool `json:"frame,omitempty" yaml:"frame,omitempty"` // Encircle set the text style to encircled. Encircle *bool `json:"encircle,omitempty" yaml:"encircle,omitempty"` // Overline set the text style to overlined. Overline *bool `json:"overline,omitempty" yaml:"overline,omitempty"` // Foreground set the fore-color of text Foreground *Color `json:"foreground,omitempty" yaml:"foreground,omitempty"` // Foreground set the back-color of text Background *Color `json:"background,omitempty" yaml:"background,omitempty"` }
Style format the text with ANSI
Click to show internal directories.
Click to hide internal directories.