Documentation ¶
Index ¶
- Variables
- type Format
- type ProgressBar
- func (p *ProgressBar) Add(n int) bool
- func (p *ProgressBar) Busy(times int)
- func (p *ProgressBar) Cls()
- func (p *ProgressBar) Finish()
- func (p *ProgressBar) Inc() bool
- func (pb *ProgressBar) Read(p []byte) (n int, err error)
- func (p *ProgressBar) Set(to int) bool
- func (pb *ProgressBar) Write(p []byte) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ProgressFormats = []Format{ Format{ Fill: []string{"▓", "█"}, Empty: "░", }, Format{ Fill: []string{"⬤"}, Empty: "◯", }, Format{ Fill: []string{"■"}, Empty: "□", }, Format{ Fill: []string{"⚫"}, Empty: "⚪", }, Format{ Fill: []string{"▰"}, Empty: "▱", }, Format{ Fill: []string{"⬛"}, Empty: "⬜", }, Format{ Fill: []string{"⡀", "⡄", "⡆", "⡇", "⡏", "⡟", "⡿", "⣿"}, Empty: "⣀", }, Format{ Fill: []string{"="}, Head: ">", LeftEnd: "[", RightEnd: "]", Empty: " ", }, Format{ Fill: []string{"▏", "▎", "▍", "▌", "▋", "▊", "▉"}, Empty: " ", }, } )
Functions ¶
This section is empty.
Types ¶
type ProgressBar ¶
type ProgressBar struct { Format Out io.Writer //where to write Width int //width of the bar Stop bool // contains filtered or unexported fields }
func New ¶
func New(total int) *ProgressBar
func (*ProgressBar) Add ¶
func (p *ProgressBar) Add(n int) bool
func (*ProgressBar) Busy ¶
func (p *ProgressBar) Busy(times int)
func (*ProgressBar) Cls ¶
func (p *ProgressBar) Cls()
func (*ProgressBar) Finish ¶
func (p *ProgressBar) Finish()
func (*ProgressBar) Inc ¶
func (p *ProgressBar) Inc() bool
func (*ProgressBar) Read ¶
func (pb *ProgressBar) Read(p []byte) (n int, err error)
implement io.Reader
func (*ProgressBar) Set ¶
func (p *ProgressBar) Set(to int) bool
Click to show internal directories.
Click to hide internal directories.