Skip to content
kura-labPublic

About

Terminal progress table like Bubble Wrap for Golang

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

31 Commits

Folders and files

Repository files navigation

Terminal progress table like Bubble Wrap for Golang

Build Status GoDoc

Demo

bw

Installation

go get github.com/kura-lab/bw

Get start

package main

import (
	"time"

	"github.com/kura-lab/bw"
)

func main() {
	numbers := 220

	bw := bw.NewBubbleWrap(numbers)
	bw.Display()

	for i := 0; i < numbers; i++ {
		time.Sleep(20 * time.Millisecond)
		bw.Pop(i)
		bw.Redisplay()

		// you can call when need to interrupt
		// bw.Interrupt()
	}
}

Settings

numbers := 220

// set numbers of a column
bw := NewBubbleWrap(numbers).SetColumn(60)

// change bubble's shapes
bw := NewBubbleWrap(numbers).ChangeBubbleShape("o", "x")

// change bubble's colors
before := color.New(color.FgCyan)
after := color.New(color.FgRed)
bw := NewBubbleWrap(numbers).ChangeBubbleColor(before, after)

About

Terminal progress table like Bubble Wrap for Golang

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages