utils

package
v0.0.0-...-7f4d6aa Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2023 License: MIT Imports: 4 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 {
	Title string // displayed label for the progressbar
	Scale uint16 // width of the bar (3 means that 1/3% of the terminal size)
	Ended bool   // true if the 100% has been reached
}

func (*ProgressBar) Clear

func (p *ProgressBar) Clear()

clear whole line and move cursor to leftmost of line

func (*ProgressBar) End

func (p *ProgressBar) End()

func (*ProgressBar) GetWinSize

func (p *ProgressBar) GetWinSize() (*WinSize, error)

see: http://www.delorie.com/djgpp/doc/libc/libc_495.html

func (*ProgressBar) Repeat

func (b *ProgressBar) Repeat(str string, count int) string

func (*ProgressBar) Show

func (p *ProgressBar) Show(percent float32) error

type WinSize

type WinSize struct {
	Ws_row    uint16 // rows, in characters
	Ws_col    uint16 // columns, in characters
	Ws_xpixel uint16 // horizontal size, pixels
	Ws_ypixel uint16 // vertical size, pixels
}

Jump to

Keyboard shortcuts

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