progressbar

package module
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: MIT Imports: 4 Imported by: 1

README ΒΆ

test Go Reference Go Report Card coverage

progressbar

A simple progress bar for golang projects. I created that because there was a long processus in some projet and I didn't know what was the progression.

Installation

go get -u github.com/disco07/progressbar

Usage

Basic usage
bar := progressbar.Default(100)
for i := 0; i < 100; i++ {
    bar.Add(1)
    time.Sleep(100 * time.Millisecond)
}

Basic bar

Contributing 🀝

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

πŸ“ License

Documentation ΒΆ

Index ΒΆ

Constants ΒΆ

This section is empty.

Variables ΒΆ

This section is empty.

Functions ΒΆ

This section is empty.

Types ΒΆ

type Bar ΒΆ

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

func Default ΒΆ

func Default(end int64) *Bar

Default is a basic usage of progress bar. In parameter, the max size of things you want to view progress. It returns a pointer of Bar.

func New ΒΆ

func New(end int64) *Bar

func (*Bar) Add ΒΆ

func (b *Bar) Add(num int) error

Add is a func who add the number passed as a parameter to the progress bar.

func (*Bar) SetTheme ΒΆ

func (b *Bar) SetTheme(t Theme)

type Theme ΒΆ

type Theme struct {
	GraphType  string
	GraphStart string
	GraphEnd   string
	GraphWidth int64
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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