mcon

package
v0.0.0-...-52c4d39 Latest Latest
Warning

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

Go to latest
Published: May 4, 2016 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

View Source
const (
	NEW_LINE_BYTE = byte(10)
)

Variables

This section is empty.

Functions

func PrintBlack

func PrintBlack(s string)

func PrintBlue

func PrintBlue(s string)

func PrintCyan

func PrintCyan(s string)

func PrintGreen

func PrintGreen(s string)

func PrintMagenta

func PrintMagenta(s string)

func PrintRed

func PrintRed(s string)

func PrintWhite

func PrintWhite(s string)

func PrintYellow

func PrintYellow(s string)

func PrintfBlack

func PrintfBlack(f string, args ...interface{})

func PrintfBlue

func PrintfBlue(f string, args ...interface{})

PrintfBlue print msg in blue color

func PrintfCyan

func PrintfCyan(f string, args ...interface{})

func PrintfGreen

func PrintfGreen(f string, args ...interface{})

func PrintfMagenta

func PrintfMagenta(f string, args ...interface{})

func PrintfRed

func PrintfRed(f string, args ...interface{})

func PrintfWhite

func PrintfWhite(f string, args ...interface{})

func PrintfYellow

func PrintfYellow(f string, args ...interface{})

func ReadLine

func ReadLine() (result string)

ReadLine from os.Stdio

func ReadLineWithMsg

func ReadLineWithMsg(msg string) string

ReadLineWithMsg

func ReadNotBlankLine

func ReadNotBlankLine() (result string)

func ReadNotBlankLineWithMsg

func ReadNotBlankLineWithMsg(msg string) string

Types

type ColorPrinter

type ColorPrinter interface {
	PrintBlack(s string) //trace
	PrintWhite(s string) //trace

	PrintRed(s string)    //error
	PrintYellow(s string) //warn
	PrintGreen(s string)  //info

	PrintBlue(s string)    //blue
	PrintMagenta(s string) //Magenta
	PrintCyan(s string)    //debug
}

trace debug info warn error

func GetColorPrinter

func GetColorPrinter() ColorPrinter

type Console

type Console struct {
}

define Console

func NewConsole

func NewConsole() *Console

func (Console) ColorPrint

func (c Console) ColorPrint(s string, i int)

func (Console) PrintBlack

func (c Console) PrintBlack(s string)

implments for ColorPriter

func (Console) PrintBlue

func (c Console) PrintBlue(s string)

func (Console) PrintCyan

func (c Console) PrintCyan(s string)

func (Console) PrintGreen

func (c Console) PrintGreen(s string)

func (Console) PrintMagenta

func (c Console) PrintMagenta(s string)

func (Console) PrintRed

func (c Console) PrintRed(s string)

func (Console) PrintWhite

func (c Console) PrintWhite(s string)

func (Console) PrintYellow

func (c Console) PrintYellow(s string)

type XtermConsole

type XtermConsole struct {
	*mterm.ColorTerm
}

XtermConsole implements ColorPrinter

func NewXtermConsole

func NewXtermConsole() *XtermConsole

Directories

Path Synopsis
demo

Jump to

Keyboard shortcuts

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