progressbar

package
v0.0.0-...-02f5282 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package progressbar makes it possible to create a progressbar to see the progress in any kind of loops and how long time the work in it takes!

Package progressbar makes it possible to create a progressbar to see the progress in any kind of loops and how long time the work in it takes!

Package progressbar makes it possible to create a progressbar to see the progress in any kind of loops and how long time the work in it takes!

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(maxValue int, arg ...Change) *theBar

New Creates a new bar with default values

func StartNew

func StartNew(maxValue int, arg ...Change) *theBar

StartNew creates a new bar with default values and takes in Change values if wanted + starts the counter

Types

type Change

type Change func(bar *theBar) error

Change is the type to pass in when changing the default values in the progressbar

func NewDescription

func NewDescription(dec string) Change

NewDescription change the description in front of the bar

func SetStyle

func SetStyle(style Style) Change

SetStyle to change the style of the progressbar

func SetWidth

func SetWidth(setW int) Change

SetWidth let you change the width of the progressbar

func ShowPercent

func ShowPercent(show bool) Change

ShowPercent returns a function for setting whether the Bar displays a percentage.

func ShowTime

func ShowTime(showTime bool) Change

ShowTime returns a function for setting whether the Bar displays elapsed time.

type Style

type Style struct {
	StartChar     string
	EndChar       string
	ProgressChar  string
	StartEndColor string
	ProgressColor string
}

Style is how to progressbar will look and what colors it will have

Jump to

Keyboard shortcuts

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