Documentation ¶
Index ¶
- func RunningOnTerminal() bool
- type Progress
- func (p *Progress) AddBar(count int)
- func (p *Progress) ColoredPrintf(msg string, a ...interface{})
- func (p *Progress) Flush()
- func (p *Progress) InitBar(count int64, isBytes bool)
- func (p *Progress) Printf(msg string, a ...interface{})
- func (p *Progress) SetBar(count int)
- func (p *Progress) Shutdown()
- func (p *Progress) ShutdownBar()
- func (p *Progress) Start()
- func (p *Progress) Write(s []byte) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunningOnTerminal ¶
func RunningOnTerminal() bool
RunningOnTerminal checks whether stdout is terminal
Types ¶
type Progress ¶
type Progress struct {
// contains filtered or unexported fields
}
Progress is a progress displaying subroutine, it allows to show download and other operations progress mixed with progress bar
func (*Progress) ColoredPrintf ¶
ColoredPrintf does printf in colored way + newline
func (*Progress) Flush ¶
func (p *Progress) Flush()
Flush waits for all queued messages to be displayed
func (*Progress) ShutdownBar ¶
func (p *Progress) ShutdownBar()
ShutdownBar stops progress bar and hides it
Click to show internal directories.
Click to hide internal directories.