Documentation ¶
Index ¶
- func Debug(args ...interface{})
- func Debugf(fmtString string, args ...interface{})
- func Error(args ...interface{})
- func Errorf(fmtString string, args ...interface{})
- func Info(args ...interface{})
- func Infof(fmtString string, args ...interface{})
- func SetDebug(debug bool)
- func Warn(args ...interface{})
- func Warnf(fmtString string, args ...interface{})
- func Wrap(s string, mods ...Modification) string
- type Logger
- func (l *Logger) Debug(args ...interface{})
- func (l *Logger) Debugf(fmtString string, args ...interface{})
- func (l *Logger) Error(args ...interface{})
- func (l *Logger) Errorf(fmtString string, args ...interface{})
- func (l *Logger) Info(args ...interface{})
- func (l *Logger) Infof(fmtString string, args ...interface{})
- func (l *Logger) SetDebug(debug bool)
- func (l *Logger) Warn(args ...interface{})
- func (l *Logger) Warnf(fmtString string, args ...interface{})
- type Modification
- type Modifications
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Wrap ¶
func Wrap(s string, mods ...Modification) string
colors and modes https://habrahabr.ru/post/119436/ https://misc.flogisoft.com/bash/tip_colors_and_formatting TODO play with this https://stackoverflow.com/questions/28432398/difference-between-some-operators-golang
Types ¶
type Modification ¶
type Modification int
const ( // Common attributes [0, 1, 2, 4, 5, 7] Default Modification = iota Bold SemiBright UnderLine Blink Reversion )
const ( // Char colors [30-37] BlackChar Modification = iota + 30 RedChar GreenChar YellowChar BlueChar PurpleChar AquamarineChar GrayChar )
const ( // Background colors [40-47] BlackBackground Modification = iota + 40 RedBackground GreenBackground YellowBackground BlueBackground PurpleBackground AquamarineBackground GrayBackground )
type Modifications ¶
type Modifications []Modification
func (Modifications) String ¶
func (ms Modifications) String() string
Click to show internal directories.
Click to hide internal directories.