Documentation
¶
Index ¶
- type Log
- func (l *Log) Debugf(format string, a ...interface{})
- func (l *Log) Debugln(a ...interface{})
- func (l *Log) Errorf(format string, a ...interface{})
- func (l *Log) Errorln(a ...interface{})
- func (l *Log) Infof(format string, a ...interface{})
- func (l *Log) Infoln(a ...interface{})
- func (l *Log) Level() LogLevel
- func (l *Log) Printf(format string, a ...interface{})
- func (l *Log) Println(a ...interface{})
- func (l *Log) Printo(a ...interface{})
- func (l *Log) ProgressBar() ProgressbarPrinter
- func (l *Log) Section() *pterm.SectionPrinter
- func (l *Log) SetLevel(logLevel string) error
- func (l *Log) Spinner() pterm.SpinnerPrinter
- func (l *Log) Successf(format string, a ...interface{})
- func (l *Log) Successln(a ...interface{})
- func (l *Log) Table() pterm.TablePrinter
- func (l *Log) Warnf(format string, a ...interface{})
- func (l *Log) Warnln(a ...interface{})
- type LogLevel
- type Logger
- type ProgressbarPrinter
- func (p *ProgressbarPrinter) Add(count int)
- func (p *ProgressbarPrinter) Increment()
- func (p *ProgressbarPrinter) Start() (*ProgressbarPrinter, error)
- func (p *ProgressbarPrinter) UpdateTitle(title string)
- func (p ProgressbarPrinter) WithBarCharacter(char string) *ProgressbarPrinter
- func (p ProgressbarPrinter) WithBarStyle(style *pterm.Style) *ProgressbarPrinter
- func (p ProgressbarPrinter) WithCurrent(current int) *ProgressbarPrinter
- func (p ProgressbarPrinter) WithElapsedTimeRoundingFactor(duration time.Duration) *ProgressbarPrinter
- func (p ProgressbarPrinter) WithLastCharacter(char string) *ProgressbarPrinter
- func (p ProgressbarPrinter) WithRemoveWhenDone(b ...bool) *ProgressbarPrinter
- func (p ProgressbarPrinter) WithShowCount(b ...bool) *ProgressbarPrinter
- func (p ProgressbarPrinter) WithShowElapsedTime(b ...bool) *ProgressbarPrinter
- func (p ProgressbarPrinter) WithShowPercentage(b ...bool) *ProgressbarPrinter
- func (p ProgressbarPrinter) WithShowTitle(b ...bool) *ProgressbarPrinter
- func (p ProgressbarPrinter) WithTitle(name string) *ProgressbarPrinter
- func (p ProgressbarPrinter) WithTitleStyle(style *pterm.Style) *ProgressbarPrinter
- func (p ProgressbarPrinter) WithTotal(total int) *ProgressbarPrinter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Log ¶
type Log struct {
// contains filtered or unexported fields
}
func (*Log) ProgressBar ¶
func (l *Log) ProgressBar() ProgressbarPrinter
func (*Log) Section ¶ added in v0.1.2
func (l *Log) Section() *pterm.SectionPrinter
func (*Log) Spinner ¶
func (l *Log) Spinner() pterm.SpinnerPrinter
func (*Log) Table ¶
func (l *Log) Table() pterm.TablePrinter
type Logger ¶
type Logger interface { Printf(format string, a ...interface{}) Println(a ...interface{}) Printo(a ...interface{}) Debugf(format string, a ...interface{}) Debugln(a ...interface{}) Infof(format string, a ...interface{}) Infoln(a ...interface{}) Successf(format string, a ...interface{}) Successln(a ...interface{}) Warnf(format string, a ...interface{}) Warnln(a ...interface{}) Errorf(format string, a ...interface{}) Errorln(a ...interface{}) Level() LogLevel SetLevel(logLevel string) error Spinner() pterm.SpinnerPrinter Table() pterm.TablePrinter Section() *pterm.SectionPrinter ProgressBar() ProgressbarPrinter }
type ProgressbarPrinter ¶ added in v0.1.2
type ProgressbarPrinter struct { *pterm.ProgressbarPrinter // contains filtered or unexported fields }
func (*ProgressbarPrinter) Add ¶ added in v0.1.2
func (p *ProgressbarPrinter) Add(count int)
Add to current value.
func (*ProgressbarPrinter) Increment ¶ added in v0.1.2
func (p *ProgressbarPrinter) Increment()
Increment current value by one.
func (*ProgressbarPrinter) Start ¶ added in v0.1.2
func (p *ProgressbarPrinter) Start() (*ProgressbarPrinter, error)
func (*ProgressbarPrinter) UpdateTitle ¶ added in v0.1.2
func (p *ProgressbarPrinter) UpdateTitle(title string)
Add to current value.
func (ProgressbarPrinter) WithBarCharacter ¶ added in v0.1.2
func (p ProgressbarPrinter) WithBarCharacter(char string) *ProgressbarPrinter
WithBarCharacter sets the bar character of the ProgressbarPrinter.
func (ProgressbarPrinter) WithBarStyle ¶ added in v0.1.2
func (p ProgressbarPrinter) WithBarStyle(style *pterm.Style) *ProgressbarPrinter
WithBarStyle sets the style of the bar.
func (ProgressbarPrinter) WithCurrent ¶ added in v0.1.2
func (p ProgressbarPrinter) WithCurrent(current int) *ProgressbarPrinter
WithCurrent sets the current value of the ProgressbarPrinter.
func (ProgressbarPrinter) WithElapsedTimeRoundingFactor ¶ added in v0.1.2
func (p ProgressbarPrinter) WithElapsedTimeRoundingFactor(duration time.Duration) *ProgressbarPrinter
WithElapsedTimeRoundingFactor sets the rounding factor of the elapsed time.
func (ProgressbarPrinter) WithLastCharacter ¶ added in v0.1.2
func (p ProgressbarPrinter) WithLastCharacter(char string) *ProgressbarPrinter
WithLastCharacter sets the last character of the ProgressbarPrinter.
func (ProgressbarPrinter) WithRemoveWhenDone ¶ added in v0.1.2
func (p ProgressbarPrinter) WithRemoveWhenDone(b ...bool) *ProgressbarPrinter
WithRemoveWhenDone sets if the ProgressbarPrinter should be removed when it is done.
func (ProgressbarPrinter) WithShowCount ¶ added in v0.1.2
func (p ProgressbarPrinter) WithShowCount(b ...bool) *ProgressbarPrinter
WithShowCount sets if the total and current count should be displayed in the ProgressbarPrinter.
func (ProgressbarPrinter) WithShowElapsedTime ¶ added in v0.1.2
func (p ProgressbarPrinter) WithShowElapsedTime(b ...bool) *ProgressbarPrinter
WithShowElapsedTime sets if the elapsed time should be displayed in the ProgressbarPrinter.
func (ProgressbarPrinter) WithShowPercentage ¶ added in v0.1.2
func (p ProgressbarPrinter) WithShowPercentage(b ...bool) *ProgressbarPrinter
WithShowPercentage sets if the completed percentage should be displayed in the ProgressbarPrinter.
func (ProgressbarPrinter) WithShowTitle ¶ added in v0.1.2
func (p ProgressbarPrinter) WithShowTitle(b ...bool) *ProgressbarPrinter
WithShowTitle sets if the title should be displayed in the ProgressbarPrinter.
func (ProgressbarPrinter) WithTitle ¶ added in v0.1.2
func (p ProgressbarPrinter) WithTitle(name string) *ProgressbarPrinter
WithTitle sets the name of the ProgressbarPrinter.
func (ProgressbarPrinter) WithTitleStyle ¶ added in v0.1.2
func (p ProgressbarPrinter) WithTitleStyle(style *pterm.Style) *ProgressbarPrinter
WithTitleStyle sets the style of the title.
func (ProgressbarPrinter) WithTotal ¶ added in v0.1.2
func (p ProgressbarPrinter) WithTotal(total int) *ProgressbarPrinter
// WithTotal sets the total value of the ProgressbarPrinter.