vardius / progress-go

Go simple progress bar writing to output

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ’― progress-go

Build Status Go Report Card codecov license

logo

Go simple progress bar writing to output

πŸ“– ABOUT

Contributors:

Want to contribute ? Feel free to send pull requests!

Have problems, bugs, feature ideas? We are using the github issue tracker to manage them.

πŸ“š Documentation

For examples visit godoc#pkg-examples

For GoDoc reference, visit pkg.go.dev

🚏 HOW TO USE

Progress Bar CLI

🏫 Basic example

package main

import (
	"log"

	"github.com/vardius/progress-go"
)

func main() {
	bar := progress.New(0, 10)

	_, _ = bar.Start()
	defer func() {
		if _, err := bar.Stop(); err != nil {
			log.Printf("failed to finish progress: %v", err)
		}
	}()

	for i := 0; i < 10; i++ {
		_, _ = bar.Advance(1)
	}
}

πŸ“œ License

This package is released under the MIT license. See the complete license in the package.

About

Go simple progress bar writing to output

License:MIT License


Languages

Language:Go 100.0%