progressindicator

package
v0.43.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultRefreshRate = time.Millisecond * 300
	DefaultCharset     = spinner.CharSets[38]
	DefaultColor       = "blue"
)

Functions

This section is empty.

Types

type ProgressIndicator

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

ProgressIndicator is used to indicator the progress of the running command.

func New

func New() *ProgressIndicator

New creates a new progress indicator.

func (*ProgressIndicator) IsActive

func (pi *ProgressIndicator) IsActive() bool

IsActive returns whether the progress indicator is active or not.

func (*ProgressIndicator) SetCharset

func (pi *ProgressIndicator) SetCharset(charset []string) *ProgressIndicator

SetCharset sets the prefix for progress indicator.

func (*ProgressIndicator) SetColor

func (pi *ProgressIndicator) SetColor(color string) *ProgressIndicator

SetColor sets the prefix for progress indicator.

func (*ProgressIndicator) SetPrefix

func (pi *ProgressIndicator) SetPrefix(text string) *ProgressIndicator

SetPrefix sets the prefix for progress indicator.

func (*ProgressIndicator) SetText

func (pi *ProgressIndicator) SetText(text string) *ProgressIndicator

SetText sets the text for progress indicator.

func (*ProgressIndicator) Start

func (pi *ProgressIndicator) Start() *ProgressIndicator

Start starts the progress indicator.

func (*ProgressIndicator) Stop

Stop stops the progress indicator.

Jump to

Keyboard shortcuts

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