Documentation ¶
Index ¶
- Constants
- Variables
- func FuncValidator(pos int, validator func(string) error) cobra.PositionalArgs
- func ValidationChain(funcs ...cobra.PositionalArgs) cobra.PositionalArgs
- type MultiBar
- type Progress
- func (p *Progress) Activate()
- func (p *Progress) Add(n int64)
- func (p *Progress) Completed() bool
- func (p *Progress) Current() int64
- func (p *Progress) Incr()
- func (p *Progress) Label() string
- func (p *Progress) SetCompleted(completed bool)
- func (p *Progress) SetCurrent(n int64)
- func (p *Progress) SetTotal(n int64)
- func (p *Progress) Total() int64
- type ProgressReporter
Constants ¶
View Source
const ( Bar = iota Spinner SpinnerNoCounter )
Variables ¶
View Source
var ( ErrInvalid = errors.New("validation") ErrNoValidation = errors.New("no validation function passed OR condition") )
Functions ¶
func FuncValidator ¶
func FuncValidator(pos int, validator func(string) error) cobra.PositionalArgs
func ValidationChain ¶
func ValidationChain(funcs ...cobra.PositionalArgs) cobra.PositionalArgs
Types ¶
type MultiBar ¶
type MultiBar struct {
// contains filtered or unexported fields
}
func NewMultiBar ¶
func NewMultiBar(r ProgressReporter) *MultiBar
type Progress ¶
type Progress struct {
// contains filtered or unexported fields
}
func NewActiveProgress ¶
func NewProgress ¶
func (*Progress) SetCompleted ¶
func (*Progress) SetCurrent ¶
type ProgressReporter ¶
type ProgressReporter interface {
Progress() []*Progress
}
Click to show internal directories.
Click to hide internal directories.