printer

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoldBlue

func BoldBlue(msg interface{}) string

BoldBlue returns a string formatted with blue and bold.

func BoldRed

func BoldRed(msg interface{}) string

BoldRed returns a string formatted with red and bold.

Types

type Printer

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

Printer is a wrapper around the fmt package to print to a defined output.

func Newprinter

func Newprinter(output io.Writer) (*Printer, error)

Newprinter returns a new Printer.

func (*Printer) Print

func (p *Printer) Print(i ...interface{})

Print is a convenience method to Print to the defined output.

func (*Printer) PrintSpinner

func (p *Printer) PrintSpinner(message string) error

PrintSpinner starts a spinner and returns a function to stop it.

func (*Printer) Printf

func (p *Printer) Printf(format string, i ...interface{})

Printf is a convenience method to Printf to the defined output.

func (*Printer) Println

func (p *Printer) Println(i ...interface{})

Println is a convenience method to Println to the defined output.

func (*Printer) SetOutput added in v0.4.0

func (p *Printer) SetOutput(output io.Writer)

func (*Printer) StopFailSpinner

func (p *Printer) StopFailSpinner(message string) error

func (*Printer) StopSpinner

func (p *Printer) StopSpinner(message string) error

Jump to

Keyboard shortcuts

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