console

package
v1.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2020 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

View Source
const (
	NONE   = 0
	STATUS = 1 << iota
	DATE
	FILE
)
View Source
const Asc = tab.Asc
View Source
const Dec = tab.Dsc

Variables

View Source
var DefaultLogger *defaultLogger

Functions

func Assert

func Assert(v ...interface{})

func Debug

func Debug(v ...interface{})

func Debugf added in v1.1.5

func Debugf(format string, v ...interface{})

func Error

func Error(v ...interface{})

func Errorf added in v1.1.5

func Errorf(format string, v ...interface{})

func Exit

func Exit(v interface{})

func Info added in v1.1.5

func Info(v ...interface{})

func Infof added in v1.1.5

func Infof(format string, v ...interface{})

func NewDefaultLogger added in v1.1.6

func NewDefaultLogger() *defaultLogger

func NewList

func NewList() *list

func NewTable

func NewTable() *table

func OneLine

func OneLine(format string, v ...interface{})

func Printf

func Printf(format string, v ...interface{})

func Println

func Println(v ...interface{})

func SetFlags added in v1.1.5

func SetFlags(v int)

func SetLogger added in v1.1.4

func SetLogger(logger Logger)

func Warning

func Warning(v ...interface{})

func Warningf added in v1.1.5

func Warningf(format string, v ...interface{})

Types

type Color

type Color int
const (
	Reset Color = iota
	Bold
	Faint
	Italic
	Underline
	BlinkSlow
	BlinkRapid
	ReverseVideo
	Concealed
	CrossedOut
)

Base colors -- attributes in reality

const (
	FgBlack Color = iota + 30
	FgRed
	FgGreen
	FgYellow
	FgBlue
	FgMagenta
	FgCyan
	FgWhite
)

Foreground colors

const (
	FgHiBlack Color = iota + 90
	FgHiRed
	FgHiGreen
	FgHiYellow
	FgHiBlue
	FgHiMagenta
	FgHiCyan
	FgHiWhite
)

Foreground Hi-Intensity colors

const (
	BgBlack Color = iota + 40
	BgRed
	BgGreen
	BgYellow
	BgBlue
	BgMagenta
	BgCyan
	BgWhite
)

Background colors

const (
	BgHiBlack Color = iota + 100
	BgHiRed
	BgHiGreen
	BgHiYellow
	BgHiBlue
	BgHiMagenta
	BgHiCyan
	BgHiWhite
)

Background Hi-Intensity colors

func (Color) Printf

func (c Color) Printf(format string, v ...interface{})

func (Color) Println

func (c Color) Println(v ...interface{})

type Logger

type Logger interface {
	Errorf(string, ...interface{})
	Warningf(string, ...interface{})
	Infof(string, ...interface{})
	Debugf(string, ...interface{})
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL