printer

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSON

func JSON(data interface{}) error

JSON prints the data as JSON.

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 Table

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

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

func Text

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

Text prints the data for a given format

func YAML

func YAML(data interface{}) error

YAML prints the data as YAML.

Types

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

Jump to

Keyboard shortcuts

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