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) Print(a ...interface{})
- func (l *Log) Printf(format string, a ...interface{})
- func (l *Log) Println(a ...interface{})
- func (l *Log) Printo(a ...interface{})
- func (l *Log) ProgressBar() Progressbar
- func (l *Log) Section() Section
- func (l *Log) SetLevel(logLevel LogLevel)
- func (l *Log) SetLevelString(logLevel string) error
- func (l *Log) Spinner() Spinner
- func (l *Log) Successf(format string, a ...interface{})
- func (l *Log) Successln(a ...interface{})
- func (l *Log) Table() Table
- func (l *Log) Warnf(format string, a ...interface{})
- func (l *Log) Warnln(a ...interface{})
- type LogLevel
- type Logger
- type PrefixPrinter
- type Progressbar
- type ProgressbarPrinter
- func (p *ProgressbarPrinter) Add(count int)
- func (p *ProgressbarPrinter) Increment()
- func (p *ProgressbarPrinter) Start() (Progressbar, error)
- func (p *ProgressbarPrinter) Stop()
- func (p *ProgressbarPrinter) UpdateTitle(title string)
- func (p *ProgressbarPrinter) WithBarCharacter(char string) Progressbar
- func (p *ProgressbarPrinter) WithBarStyle(style *pterm.Style) Progressbar
- func (p *ProgressbarPrinter) WithCurrent(current int) Progressbar
- func (p *ProgressbarPrinter) WithElapsedTimeRoundingFactor(duration time.Duration) Progressbar
- func (p *ProgressbarPrinter) WithLastCharacter(char string) Progressbar
- func (p *ProgressbarPrinter) WithRemoveWhenDone(b ...bool) Progressbar
- func (p *ProgressbarPrinter) WithShowCount(b ...bool) Progressbar
- func (p *ProgressbarPrinter) WithShowElapsedTime(b ...bool) Progressbar
- func (p *ProgressbarPrinter) WithShowPercentage(b ...bool) Progressbar
- func (p *ProgressbarPrinter) WithShowTitle(b ...bool) Progressbar
- func (p *ProgressbarPrinter) WithTitle(name string) Progressbar
- func (p *ProgressbarPrinter) WithTitleStyle(style *pterm.Style) Progressbar
- func (p *ProgressbarPrinter) WithTotal(total int) Progressbar
- type Section
- type SectionPrinter
- type Spinner
- type SpinnerPrinter
- type Table
- type TablePrinter
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() Progressbar
func (*Log) SetLevelString ¶ added in v0.1.23
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 LogLevel) SetLevelString(logLevel string) error Spinner() Spinner Table() Table Section() Section ProgressBar() Progressbar }
type PrefixPrinter ¶ added in v0.1.45
type PrefixPrinter struct {
*pterm.PrefixPrinter
}
func (*PrefixPrinter) Printf ¶ added in v0.1.45
func (p *PrefixPrinter) Printf(format string, a ...interface{})
func (*PrefixPrinter) Println ¶ added in v0.1.45
func (p *PrefixPrinter) Println(a ...interface{})
type Progressbar ¶ added in v0.1.45
type Progressbar interface { WithTitle(name string) Progressbar WithTotal(total int) Progressbar WithCurrent(current int) Progressbar WithBarCharacter(char string) Progressbar WithLastCharacter(char string) Progressbar WithElapsedTimeRoundingFactor(duration time.Duration) Progressbar WithShowElapsedTime(b ...bool) Progressbar WithShowCount(b ...bool) Progressbar WithShowTitle(b ...bool) Progressbar WithShowPercentage(b ...bool) Progressbar WithTitleStyle(style *pterm.Style) Progressbar WithBarStyle(style *pterm.Style) Progressbar WithRemoveWhenDone(b ...bool) Progressbar Increment() Add(count int) UpdateTitle(title string) Start() (Progressbar, error) Stop() }
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() (Progressbar, error)
func (*ProgressbarPrinter) Stop ¶ added in v0.1.45
func (p *ProgressbarPrinter) Stop()
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) Progressbar
WithBarCharacter sets the bar character of the ProgressbarPrinter.
func (*ProgressbarPrinter) WithBarStyle ¶ added in v0.1.2
func (p *ProgressbarPrinter) WithBarStyle(style *pterm.Style) Progressbar
WithBarStyle sets the style of the bar.
func (*ProgressbarPrinter) WithCurrent ¶ added in v0.1.2
func (p *ProgressbarPrinter) WithCurrent(current int) Progressbar
WithCurrent sets the current value of the ProgressbarPrinter.
func (*ProgressbarPrinter) WithElapsedTimeRoundingFactor ¶ added in v0.1.2
func (p *ProgressbarPrinter) WithElapsedTimeRoundingFactor(duration time.Duration) Progressbar
WithElapsedTimeRoundingFactor sets the rounding factor of the elapsed time.
func (*ProgressbarPrinter) WithLastCharacter ¶ added in v0.1.2
func (p *ProgressbarPrinter) WithLastCharacter(char string) Progressbar
WithLastCharacter sets the last character of the ProgressbarPrinter.
func (*ProgressbarPrinter) WithRemoveWhenDone ¶ added in v0.1.2
func (p *ProgressbarPrinter) WithRemoveWhenDone(b ...bool) Progressbar
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) Progressbar
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) Progressbar
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) Progressbar
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) Progressbar
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) Progressbar
WithTitle sets the name of the ProgressbarPrinter.
func (*ProgressbarPrinter) WithTitleStyle ¶ added in v0.1.2
func (p *ProgressbarPrinter) WithTitleStyle(style *pterm.Style) Progressbar
WithTitleStyle sets the style of the title.
func (*ProgressbarPrinter) WithTotal ¶ added in v0.1.2
func (p *ProgressbarPrinter) WithTotal(total int) Progressbar
// WithTotal sets the total value of the ProgressbarPrinter.
type Section ¶ added in v0.1.45
type Section interface { Printf(format string, a ...interface{}) Println(a ...interface{}) }
type SectionPrinter ¶ added in v0.1.45
type SectionPrinter struct {
pterm.SectionPrinter
}
func (*SectionPrinter) Printf ¶ added in v0.1.45
func (p *SectionPrinter) Printf(format string, a ...interface{})
func (*SectionPrinter) Println ¶ added in v0.1.45
func (p *SectionPrinter) Println(a ...interface{})
type SpinnerPrinter ¶ added in v0.1.45
type SpinnerPrinter struct {
*pterm.SpinnerPrinter
}
func (*SpinnerPrinter) Start ¶ added in v0.1.45
func (s *SpinnerPrinter) Start(text ...interface{}) (Spinner, error)
func (*SpinnerPrinter) Stop ¶ added in v0.1.45
func (s *SpinnerPrinter) Stop()
type TablePrinter ¶ added in v0.1.45
type TablePrinter struct {
*pterm.TablePrinter
}
func (*TablePrinter) Render ¶ added in v0.1.45
func (p *TablePrinter) Render() error
func (*TablePrinter) Srender ¶ added in v0.1.45
func (p *TablePrinter) Srender() (string, error)
func (*TablePrinter) WithData ¶ added in v0.1.45
func (p *TablePrinter) WithData(data [][]string) Table
func (*TablePrinter) WithHasHeader ¶ added in v0.1.45
func (p *TablePrinter) WithHasHeader(b ...bool) Table