Terminal progress table like Bubble Wrap for Golang
License: MIT License
Go 100.00%
bw's Introduction
Terminal progress table like Bubble Wrap for Golang
Demo
Installation
go get github.com/kura-lab/bw
Get start
package main
import (
"time""github.com/kura-lab/bw"
)
funcmain() {
numbers:=220bw:=bw.NewBubbleWrap(numbers)
bw.Display()
fori:=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 columnbw:=NewBubbleWrap(numbers).SetColumn(60)
// change bubble's shapesbw:=NewBubbleWrap(numbers).ChangeBubbleShape("o", "x")
// change bubble's colorsbefore:=color.New(color.FgCyan)
after:=color.New(color.FgRed)
bw:=NewBubbleWrap(numbers).ChangeBubbleColor(before, after)