Documentation ¶
Index ¶
- Variables
- func Bold(msg interface{}) string
- func BoldBlack(msg interface{}) string
- func BoldBlue(msg interface{}) string
- func BoldGreen(msg interface{}) string
- func BoldRed(msg interface{}) string
- func BoldYellow(msg interface{}) string
- func Emoji(emoji string) string
- func GetMilliseconds(timestamp time.Time) int64
- func GetMillisecondsIfExists(timestamp *time.Time) *int64
- func Red(msg interface{}) string
- type Format
- type Printer
- func (p *Printer) ConfirmCommand(confirmationName, commandShortName, confirmFailedName string) error
- func (p *Printer) Format() Format
- func (p *Printer) PrettyPrintJSON(b []byte) error
- func (p *Printer) Print(i ...interface{})
- func (p *Printer) PrintJSON(v interface{}) error
- func (p *Printer) PrintProgress(message string) func()
- func (p *Printer) PrintResource(v interface{}) error
- func (p *Printer) Printf(format string, i ...interface{})
- func (p *Printer) Println(i ...interface{})
- func (p *Printer) SetHumanOutput(out io.Writer)
- func (p *Printer) SetResourceOutput(out io.Writer)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func Bold ¶ added in v0.14.0
func Bold(msg interface{}) string
Bold returns a string formatted with bold.
func BoldBlack ¶ added in v0.99.0
func BoldBlack(msg interface{}) string
BoldBlack returns a string formatted with Black and bold.
func BoldBlue ¶ added in v0.14.0
func BoldBlue(msg interface{}) string
BoldBlue returns a string formatted with blue and bold.
func BoldGreen ¶ added in v0.99.0
func BoldGreen(msg interface{}) string
BoldGreen returns a string formatted with green and bold.
func BoldRed ¶ added in v0.18.0
func BoldRed(msg interface{}) string
BoldRed returns a string formatted with red and bold.
func BoldYellow ¶ added in v0.99.0
func BoldYellow(msg interface{}) string
BoldYellow returns a string formatted with yellow and bold.
func GetMilliseconds ¶ added in v0.14.0
func GetMillisecondsIfExists ¶ added in v0.14.0
Types ¶
type Format ¶ added in v0.14.0
type Format int
Format defines the option output format of a resource.
func NewFormatValue ¶ added in v0.14.0
NewFormatValue is used to define a flag that can be used to define a custom flag via the flagset.Var() method.
type Printer ¶ added in v0.14.0
type Printer struct {
// contains filtered or unexported fields
}
Printer is used to print information to the defined output.
func NewPrinter ¶ added in v0.14.0
NewPrinter returns a new Printer for the given output and format.
func (*Printer) ConfirmCommand ¶ added in v0.99.0
func (*Printer) PrettyPrintJSON ¶ added in v0.96.0
func (*Printer) Print ¶ added in v0.14.0
func (p *Printer) Print(i ...interface{})
Print is a convenience method to Print to the defined output.
func (*Printer) PrintProgress ¶ added in v0.14.0
PrintProgress starts a spinner with the relevant message. The returned function needs to be called in a defer or when it's decided to stop the spinner
func (*Printer) PrintResource ¶ added in v0.14.0
PrintResource prints the given resource in the format it was specified.
func (*Printer) Printf ¶ added in v0.14.0
Printf is a convenience method to Printf to the defined output.
func (*Printer) Println ¶ added in v0.14.0
func (p *Printer) Println(i ...interface{})
Println is a convenience method to Println to the defined output.
func (*Printer) SetHumanOutput ¶ added in v0.15.0
SetHumanOutput sets the output for human readable messages.
func (*Printer) SetResourceOutput ¶ added in v0.15.0
SetResourceOutput sets the output for pringing resources via PrintResource.