printer

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultFormat = "terminal256"
	DefaultTheme  = "monokai"
)

Functions

func PrintFormats

func PrintFormats()

func PrintLangs

func PrintLangs()

func PrintThemes

func PrintThemes()

Types

type Option

type Option func(*option)

func WithFilename

func WithFilename(filename string) Option

type Printer

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

func New

func New(cfg *PrinterConfig) *Printer

func (*Printer) Print

func (p *Printer) Print(in io.Reader, out io.Writer, opts ...Option) error

func (*Printer) SetTheme

func (p *Printer) SetTheme(t string)

type PrinterConfig

type PrinterConfig struct {
	Lang   string
	Format string
	Theme  string

	Pretty bool
}

Jump to

Keyboard shortcuts

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