console

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: May 20, 2020 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const Asc = tab.Asc
View Source
const Dec = tab.Dsc

Variables

This section is empty.

Functions

func Assert

func Assert(v ...interface{})

func Customize

func Customize(color Color, prefix string, format string, v ...interface{})

func Debug

func Debug(v ...interface{})

func Error

func Error(err interface{})

func Exit

func Exit(v interface{})

func Hook

func Hook(v bool)

func Log

func Log(v ...interface{})

func NewList

func NewList() *list

func NewTable

func NewTable() *table

func OneLine

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

func OutPut

func OutPut(v bool)

func Printf

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

func Println

func Println(v ...interface{})

func SetDebugHook

func SetDebugHook(fn func(t time.Time, file string, line int, v ...interface{}))

func SetErrorHook

func SetErrorHook(fn func(err exception.Error))

func SetHook

func SetHook(fn func(status string, t time.Time, file string, line int, v ...interface{}))

func SetLogHook

func SetLogHook(fn func(t time.Time, file string, line int, v ...interface{}))

func SetWarningHook

func SetWarningHook(fn func(t time.Time, file string, line int, v ...interface{}))

func Warning

func Warning(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 struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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