Versions in this module Expand all Collapse all v0 v0.1.8 Aug 11, 2024 Changes in this version + var DisableColors = false + var EncoderColorCyan = color.New(color.FgCyan) + var EncoderColorGreen = color.New(color.FgGreen) + var EncoderColorWhite = color.New(color.FgWhite) + var EncoderColorYellow = color.New(color.FgYellow) + func BgBytes(in []byte, r, g, b uint8) []byte + func BgString(in string, r, g, b uint8) string + func Black(str string) string + func BlackBG(str string) string + func Bold(str string) string + func CC(elems ...string) string + func Colorize(str string) string + func ColorizeBG(str string) string + func FgBytes(in []byte, r, g, b uint8) []byte + func FgString(in string, r, g, b uint8) string + func HashString(s string) uint64 + func HighlightAnyCase(str, substr string, colorer func(string) string) string + func HighlightLimeBG(str, substr string) string + func HighlightRedBG(str, substr string) string + func Indigo(str string) string + func IndigoBG(str string) string + func IsLight(rr, gg, bb uint64) bool + func Lime(str string) string + func LimeBG(str string) string + func Ln(a ...interface{}) string + func Lnsf(format string, a ...interface{}) string + func LnsfI(indent int, format string, a ...interface{}) string + func Orange(str string) string + func OrangeBG(str string) string + func Purple(str string) string + func PurpleBG(str string) string + func Red(str string) string + func RedBG(str string) string + func S(a ...interface{}) string + func Sf(format string, a ...interface{}) string + func Shakespeare(str string) string + func ShakespeareBG(str string) string + func StringToColor(str string) func(string) string + func StringToColorBG(str string) func(string) string + func White(str string) string + func WhiteBG(str string) string + func Yellow(str string) string + func YellowBG(str string) string + type Encoder struct + func NewEncoder(w io.Writer) *Encoder + func (e *Encoder) Encode(v interface{}, option *Option) (err error) + func (e *Encoder) ToWriter(s string, indent bool, c *color.Color) (err error) + type Option struct + NoTypeName bool + type TextEncodable interface + TextEncode func(encoder *Encoder, option *Option) error