Documentation ¶
Index ¶
- Variables
- func APrintln(v ...interface{}) (int, error)
- func Block(widthSize int, bg, fg, in string) (r string)
- func Parse(data string, ctags ...string) string
- func ParseAsync(data string, ctags ...string) (result chan string, err error)
- func Print(v ...interface{}) (int, error)
- func Printf(format string, v ...interface{}) (int, error)
- func Println(v ...interface{}) (int, error)
- func Sprintf(format string, v ...interface{}) string
- type FormatSymbol
- type Formatter
- func (*Formatter) Exec(in, lt, rt string, d map[string]any) string
- func (c *Formatter) Output() []byte
- func (c *Formatter) Parse(in string) string
- func (c *Formatter) Print(v ...any) (int, error)
- func (c *Formatter) Printf(f string, v ...any) (int, error)
- func (c *Formatter) Println(v ...any) (int, error)
- func (c *Formatter) Reset()
- func (c *Formatter) Sprint(v ...any) string
- func (c *Formatter) Sprintf(f string, v ...any) string
- type IFormatter
- type Screen
- type SymValue
- type SymbolsMap
- type TagFunc
- type Writer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Reset = []byte("\x1b[0m") ResetFG = []byte("\033[0;00m") Bold = []byte("\x1b[1m") Dim = []byte("\x1b[2m") Italic = []byte("\x1b[3m") Underline = []byte("\x1b[4m") Blink = []byte("\x1b[5m") Reverse = []byte("\x1b[7m") Hidden = []byte("\x1b[8m") )
View Source
var ResetAll = "\x1b[0m"
Functions ¶
Types ¶
type FormatSymbol ¶
type FormatSymbol uint8
const ( ResetSymbol FormatSymbol = iota DimSymbol ResetFGSymbol ResetBGSymbol BoldSymbol UnderlineSymbol ItalicSymbol ReverseSymbol StrikeOutSymbol NewlineSymbol ColorSymbol BGColorSymbol StyleSymbol BlinkSymbol HiddenSymbol ClearLineSymbol MovedownSymbol MoveupSymbol ListOrderedSymbol ListUnorderedSymbol ListItemSymbol )
type IFormatter ¶
type IFormatter interface { Init() error GetSymbols() SymbolsMap IsSymbolOf(string) (FormatSymbol, bool) }
type SymValue ¶
type SymValue struct { Sym FormatSymbol Value []byte }
type SymbolsMap ¶
type SymbolsMap map[FormatSymbol]string
func (SymbolsMap) GetValueOf ¶
func (s SymbolsMap) GetValueOf(sym FormatSymbol) (result any, ok bool)
Click to show internal directories.
Click to hide internal directories.