terminal

package
v1.0.17 Latest Latest
Warning

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

Go to latest
Published: May 26, 2025 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Slow bool = true
	Fast bool = false
)

Variables

Functions

func Action

func Action(level Level, msg string, slow bool)

func CleanUp

func CleanUp()

func DashedLine

func DashedLine(fromCol int)

func Error

func Error(err error)

func HideCursor

func HideCursor()

func IsInteractive

func IsInteractive() bool

func Line

func Line(level Level, msg string, slow bool)

func Print

func Print(cs []color.Attribute, slow bool, text string)

func PrintF

func PrintF(cs []color.Attribute, slow bool, format string, a ...any)

func RestorePos

func RestorePos()

func Result

func Result(ok bool)

func SavePos

func SavePos()

func SetNoColor

func SetNoColor(forceNoColor bool)

func ShowCursor

func ShowCursor()

func SpinnerStyles

func SpinnerStyles() []string

func SpinnerStylesString

func SpinnerStylesString() string

func TableTile

func TableTile(title string)

Types

type Level

type Level int
const (
	DebugLevel Level = iota
	InfoLevel
	WarnLevel
	ErrorLevel
)

type Progress

type Progress struct {
	OutBuffer *bytes.Buffer
	ErrBuffer *bytes.Buffer
	// contains filtered or unexported fields
}

func NewProgress

func NewProgress(title, style string) *Progress

func (*Progress) Start

func (p *Progress) Start()

func (*Progress) Stop

func (p *Progress) Stop(ok bool)

Jump to

Keyboard shortcuts

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