printer

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Blue added in v0.4.0

func Blue(t ...string) string

func Bluef added in v0.4.0

func Bluef(t string, args ...interface{}) string

func Bold

func Bold(t ...string)

func Boldf

func Boldf(t string, args ...interface{})

func Boldln

func Boldln(t ...string)

func Cyan added in v0.4.0

func Cyan(t ...string) string

func Cyanf added in v0.4.0

func Cyanf(t string, args ...interface{}) string

func Error

func Error(t ...string)

func ErrorIcon

func ErrorIcon()

func Errorf

func Errorf(t string, args ...interface{})

func Errorln

func Errorln(t ...string)

func FailureIcon added in v0.4.0

func FailureIcon() string

func File

func File(data interface{}, format string) (err error)

File prints the data for a given format

func Green added in v0.4.0

func Green(t ...string) string

func Greenf added in v0.4.0

func Greenf(t string, args ...interface{}) string

func Grey added in v0.4.0

func Grey(t ...string) string

func Greyf added in v0.4.0

func Greyf(t string, args ...interface{}) string

func Info

func Info(t ...string)

func InfoIcon

func InfoIcon()

func Infof

func Infof(t string, args ...interface{})

func Infoln

func Infoln(t ...string)

func Italic

func Italic(t ...string)

func Italicf

func Italicf(t string, args ...interface{})

func Italicln

func Italicln(t ...string)

func JSON

func JSON(data interface{}) error

JSON prints the data as JSON.

func Magenta added in v0.4.0

func Magenta(t ...string) string

func Magentaf added in v0.4.0

func Magentaf(t string, args ...interface{}) string

func Markdown

func Markdown(text string) (string, error)

func MarkdownWithWrap

func MarkdownWithWrap(text string, wrap int) (string, error)

func PrettyJSON

func PrettyJSON(data interface{}) error

PrettyJSON prints the data as pretty JSON.

func Progress

func Progress(max int, description string) *progressbar.ProgressBar

func Red added in v0.4.0

func Red(t ...string) string

func Redf added in v0.4.0

func Redf(t string, args ...interface{}) string

func Space

func Space()

func Success

func Success(t ...string)

func SuccessIcon

func SuccessIcon()

func Successf

func Successf(t string, args ...interface{})

func Successln

func Successln(t ...string)

func Table

func Table(target io.Writer, rows [][]string)

Table writes a terminal-friendly table of the values to the target.

func Text

func Text(t ...string)

func Textf

func Textf(t string, args ...interface{})

func Textln

func Textln(t ...string)

func Warning

func Warning(t ...string)

func WarningIcon

func WarningIcon()

func Warningf

func Warningf(t string, args ...interface{})

func Warningln

func Warningln(t ...string)

func YAML

func YAML(data interface{}) error

YAML prints the data as YAML.

func Yellow added in v0.4.0

func Yellow(t ...string) string

func Yellowf added in v0.4.0

func Yellowf(t string, args ...interface{}) string

Types

type ColorScheme added in v0.4.0

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

ColorScheme is a color scheme.

func NewColorScheme added in v0.4.0

func NewColorScheme() *ColorScheme

NewColorScheme returns a new ColorScheme with the given theme.

type Indicator

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

func Spin

func Spin(label string) *Indicator

func (*Indicator) Stop

func (s *Indicator) Stop()

type RenderOpts

type RenderOpts []glamour.TermRendererOption

type Theme added in v0.4.0

type Theme struct {
	ColorGreen   termenv.Color
	ColorYellow  termenv.Color
	ColorCyan    termenv.Color
	ColorRed     termenv.Color
	ColorGrey    termenv.Color
	ColorBlue    termenv.Color
	ColorMagenta termenv.Color
}

Theme represents a color theme.

Jump to

Keyboard shortcuts

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