Documentation ¶
Index ¶
- Variables
- 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 Blob
- type Bool
- type EncodableToTree
- type Encoder
- type Float128
- type HexBytes
- type Int128
- type Int64
- type JSONFloat64
- type Option
- type SafeString
- type TextEncodable
- type TreeEncoder
- type Uint128
- type Uint64
- type Varint16
- type Varint32
- type Varuint16
- type Varuint32
Constants ¶
This section is empty.
Variables ¶
View Source
var ( EncoderColorCyan = color.New(color.FgCyan) EncoderColorYellow = color.New(color.FgYellow) EncoderColorGreen = color.New(color.FgGreen) EncoderColorWhite = color.New(color.FgWhite) )
View Source
var DisableColors = false
Functions ¶
func BgBytes ¶ added in v1.8.3
BgBytes colorizes the background of the input with the terminal color that matches the closest the RGB color.
func BgString ¶ added in v1.8.3
BgString colorizes the background of the input with the terminal color that matches the closest the RGB color.
This is simply a helper for Bytes.
func ColorizeBG ¶ added in v0.4.0
func FgBytes ¶ added in v1.8.3
Bytes colorizes the foreground with the terminal color that matches the closest the RGB color.
func FgString ¶ added in v1.8.3
FgString colorizes the foreground of the input with the terminal color that matches the closest the RGB color.
This is simply a helper for Bytes.
func HashString ¶ added in v0.4.0
func HighlightAnyCase ¶ added in v0.4.0
func HighlightLimeBG ¶ added in v0.4.0
func HighlightRedBG ¶ added in v0.4.0
func ShakespeareBG ¶ added in v0.4.0
func StringToColor ¶ added in v0.4.0
func StringToColorBG ¶ added in v0.4.0
Types ¶
type Blob ¶
type Blob string
Blob is base64 encoded data https://github.com/EOSIO/fc/blob/0e74738e938c2fe0f36c5238dbc549665ddaef82/include/fc/variant.hpp#L47
type EncodableToTree ¶ added in v0.4.0
type JSONFloat64 ¶
type JSONFloat64 float64
func (JSONFloat64) TextEncode ¶
func (f JSONFloat64) TextEncode(encoder *Encoder, option *Option) error
type SafeString ¶
type SafeString string
func (SafeString) TextEncode ¶
func (ss SafeString) TextEncode(encoder *Encoder, option *Option) error
type TextEncodable ¶
type TreeEncoder ¶ added in v0.4.0
func NewTreeEncoder ¶ added in v0.4.0
func NewTreeEncoder(w io.Writer, doc string) *TreeEncoder
func (*TreeEncoder) WriteString ¶ added in v0.4.0
func (enc *TreeEncoder) WriteString(s string) (int, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.