terminal

package
v0.0.151 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2020 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(v ...interface{})

func Debugf

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

func Error

func Error(v ...interface{})

func Errorf

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

func Info

func Info(v ...interface{})

func Infof

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

func SetLogLevel

func SetLogLevel(lvl LogLevel)

func Warn

func Warn(v ...interface{})

func Warnf

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

func WithProgress

func WithProgress(message string, fn func())

func WithProgressE

func WithProgressE(message string, fn func() error) error

Types

type LogLevel

type LogLevel int
const (
	LevelDebug LogLevel = iota
	LevelInfo
	LevelWarn
	LevelError
)

type ProgressFn

type ProgressFn func() error

type Terminal

type Terminal struct {
	// contains filtered or unexported fields
}

func NewTerminal

func NewTerminal(w io.Writer) *Terminal

func (*Terminal) Column

func (l *Terminal) Column(n uint)

func (*Terminal) HideCursor

func (l *Terminal) HideCursor()

func (*Terminal) Overwrite

func (l *Terminal) Overwrite()

func (*Terminal) ResetPosition

func (l *Terminal) ResetPosition()

func (*Terminal) ShowCursor

func (l *Terminal) ShowCursor()

func (*Terminal) Up

func (l *Terminal) Up(n uint)

func (*Terminal) Write

func (l *Terminal) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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