Documentation ¶
Index ¶
- Variables
- func NewTemplate() *template.Template
- type Bar
- func (bar *Bar) Add(n int64)
- func (bar *Bar) Current() int64
- func (bar *Bar) Finished() bool
- func (bar *Bar) Inc()
- func (bar *Bar) OnFinish(tmpl *template.Template) *Bar
- func (bar *Bar) OnFinishFunc(format FormatFunc) *Bar
- func (bar *Bar) SetCurrent(current int64) *Bar
- func (bar *Bar) SetTotal(total int64) *Bar
- func (bar *Bar) Total() int64
- type FormatFunc
- type LessFunc
- type Poller
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultTemplate = template.Must(NewTemplate().Parse(`{{ percent . }} {{ bar . "[" "=" ">" " " "]" }}`))
`{{ percent . }} {{ bar . "[" "=" ">" " " "]" }}`
View Source
var ErrCanceled = errors.New("canceled by context")
Functions ¶
Types ¶
type Bar ¶
type Bar struct {
// contains filtered or unexported fields
}
func NewBarFunc ¶
func NewBarFunc(total int64, format FormatFunc) *Bar
func (*Bar) OnFinishFunc ¶
func (bar *Bar) OnFinishFunc(format FormatFunc) *Bar
func (*Bar) SetCurrent ¶
type FormatFunc ¶
Click to show internal directories.
Click to hide internal directories.