terminal

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package terminal is for terminal outputting

Index

Constants

This section is empty.

Variables

View Source
var ProgressBarMax = 100

Functions

This section is empty.

Types

type ProgressBar

type ProgressBar struct {
	Bar            *progressbar.ProgressBar
	CurrPercentage int
}

func (*ProgressBar) AdvanceTo

func (bar *ProgressBar) AdvanceTo(percentage int)

func (*ProgressBar) Describe

func (bar *ProgressBar) Describe(text string)

type Terminal

type Terminal struct {
	Green  func(format string, a ...interface{}) string
	Yellow func(format string, a ...interface{}) string
	Red    func(format string, a ...interface{}) string
	Blue   func(format string, a ...interface{}) string

	Bar ProgressBar
	// contains filtered or unexported fields
}

func New

func New() (t *Terminal)

func (*Terminal) Eprint

func (t *Terminal) Eprint(a string)

func (*Terminal) Eprintf

func (t *Terminal) Eprintf(format string, a ...interface{})

func (*Terminal) Errprint

func (t *Terminal) Errprint(err error, a string)

func (*Terminal) Errprintf

func (t *Terminal) Errprintf(err error, format string, a ...interface{})

func (*Terminal) NewProgressBar

func (t *Terminal) NewProgressBar(description string, onComplete func()) *ProgressBar

func (*Terminal) Print

func (t *Terminal) Print(a string)

func (*Terminal) Printf

func (t *Terminal) Printf(format string, a ...interface{})

func (*Terminal) SetVerbose

func (t *Terminal) SetVerbose(verbose bool)

func (*Terminal) Vprint

func (t *Terminal) Vprint(a string)

func (*Terminal) Vprintf

func (t *Terminal) Vprintf(format string, a ...interface{})

Jump to

Keyboard shortcuts

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