terminal

package
v0.6.285 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: MIT Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package terminal is for terminal outputting

Index

Constants

This section is empty.

Variables

View Source
var ProgressBarMax = 100

Functions

func DisplayBrevLogo(t *Terminal)

func DisplayGatewayAlreadyInstalledInstructions added in v0.4.0

func DisplayGatewayAlreadyInstalledInstructions(t *Terminal)

func DisplayToolboxInstalledInstructions added in v0.4.0

func DisplayToolboxInstalledInstructions(t *Terminal)

func DisplayVSCodeInstructions added in v0.4.0

func DisplayVSCodeInstructions(t *Terminal)

func InstallVSCodeExtension added in v0.4.0

func InstallVSCodeExtension(t *Terminal)

func PromptGetInput added in v0.4.0

func PromptGetInput(pc PromptContent) string

func PromptSelectInput added in v0.4.0

func PromptSelectInput(pc PromptSelectContent) string

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 PromptContent added in v0.4.0

type PromptContent struct {
	ErrorMsg   string
	Label      string
	Default    string
	AllowEmpty bool
	Mask       rune
}

type PromptSelectContent added in v0.4.0

type PromptSelectContent struct {
	ErrorMsg string
	Label    string
	Items    []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
	White  func(format string, a ...interface{}) string

	Bar ProgressBar

	Spinner *spinner.Spinner
	// 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) NewSpinner added in v0.3.0

func (t *Terminal) NewSpinner() *spinner.Spinner

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