printer

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func PrintFormats added in v0.4.0

func PrintFormats()

func PrintLangs added in v0.4.0

func PrintLangs()

func PrintThemes added in v0.4.0

func PrintThemes()

Types

type PrintFileInput

type PrintFileInput struct {
	Out      io.Writer
	Filename string
}

type PrintInput

type PrintInput struct {
	In       io.Reader
	Out      io.Writer
	Filename *string
}

type Printer

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

func New

func New(cfg *PrinterConfig) *Printer

func (*Printer) Print

func (p *Printer) Print(ipt *PrintInput) error

func (*Printer) PrintFile

func (p *Printer) PrintFile(ipt *PrintFileInput) error

func (*Printer) SetTheme added in v0.5.0

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