UI

package
v0.5.9 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: BSL-1.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProgressBar

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

ProgressBar holds the ui values Initial source: https://www.pixelstech.net/article/1596946473-A-simple-example-on-implementing-progress-bar-in-GoLang

func NewProgressBar

func NewProgressBar(label, fill, head string) *ProgressBar

NewProgressBar sets the graph values for the progress bar and returns a pointer to ProgressBar

func (*ProgressBar) Finish

func (bar *ProgressBar) Finish()

Finish resets ProgressBar and prints a new line

func (*ProgressBar) Prog

func (bar *ProgressBar) Prog(cur int64)

Prog updates the ProgressBar. This is the core method of the ProgressBar

func (*ProgressBar) Reset

func (bar *ProgressBar) Reset()

Reset nils the ProgressBar

func (*ProgressBar) Set

func (bar *ProgressBar) Set(label, fill, head string)

Set adjusts the graph values

func (*ProgressBar) Start

func (bar *ProgressBar) Start(label string, total int64)

Start is the initializer

Jump to

Keyboard shortcuts

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