cmdutils

package
v0.97.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Bar = iota
	Spinner
	SpinnerNoCounter
)

Variables

This section is empty.

Functions

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

func (*MultiBar) Start

func (b *MultiBar) Start()

func (*MultiBar) Stop

func (b *MultiBar) Stop()

type Progress

type Progress struct {
	// contains filtered or unexported fields
}

func NewActiveProgress

func NewActiveProgress(label string, progressType int) *Progress

func NewProgress

func NewProgress(label string, progressType int) *Progress

func (*Progress) Activate

func (p *Progress) Activate()

func (*Progress) Add

func (p *Progress) Add(n int64)

func (*Progress) Completed

func (p *Progress) Completed() bool

func (*Progress) Current

func (p *Progress) Current() int64

func (*Progress) Incr

func (p *Progress) Incr()

func (*Progress) Label

func (p *Progress) Label() string

func (*Progress) SetCompleted

func (p *Progress) SetCompleted(completed bool)

func (*Progress) SetCurrent

func (p *Progress) SetCurrent(n int64)

func (*Progress) SetTotal

func (p *Progress) SetTotal(n int64)

func (*Progress) Total

func (p *Progress) Total() int64

type ProgressReporter

type ProgressReporter interface {
	Progress() []*Progress
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL