Documentation
¶
Index ¶
- Constants
- Variables
- type Bar
- type Progress
- func FuncBarPrint(ctx context.Context, name string, gr *reerrgroup.Group, now, total int) *Progress
- func FuncNameBarPrint(ctx context.Context, gr *reerrgroup.Group, now, total int) *Progress
- func NewProgress(mode proFlag, m int) *Progress
- func Start(bar ...*Bar) *Progress
- func StartWithMode(mode proFlag, bar ...*Bar) *Progress
Constants ¶
View Source
const ( AutoClose proFlag = 1 << iota // if set, progress will close when all bars done ForbiddenWrite // if set, progress will if forbidden other goroutine print to Stdout through os.Stdout )
Variables ¶
View Source
var Running = make(chan struct{}, 1)
Running used to record whether there is a progress currently running. Only one progress is allowed to run at the same time.
Functions ¶
This section is empty.
Types ¶
type Progress ¶
type Progress struct { Bars []*Bar MaxPrintBar int // The maximum number of bars to print; any excess will be recorded but not displayed. // contains filtered or unexported fields }
func FuncBarPrint ¶
func FuncNameBarPrint ¶
func NewProgress ¶
func StartWithMode ¶
func (*Progress) SetMaxPrintBar ¶
Click to show internal directories.
Click to hide internal directories.