terminal

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2018 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bar

type Bar struct {
	// Fill is the default character representing completed progress
	Fill byte

	// Head is the default character that moves when progress is updated
	Head byte

	// Empty is the default character that represents the empty progress
	Empty byte

	// LeftEnd is the default character in the left most part of the progress indicator
	LeftEnd byte

	// RightEnd is the default character in the right most part of the progress indicator
	RightEnd byte

	// Width is the default width of the progress bar
	Width int
}

Bar presents progress bar

func NewBar

func NewBar() *Bar

NewBar creates new progress bar renderer

func (*Bar) Render

func (b *Bar) Render(width int, current, total int64) []byte

Render returns the byte presentation of the progress bar

type Spinner

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

Spinner is loading spinner which on each rotation moves spinner around

func NewDots

func NewDots() *Spinner

NewDots creates new spinner with dots

func (*Spinner) Rotate

func (s *Spinner) Rotate() string

Rotate rotates the spinner and returns current value

Jump to

Keyboard shortcuts

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