printer

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Indent

func Indent(depth int) string

Indent indents each depth two spaces " ".

Types

type Printer added in v0.15.0

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

func New added in v0.15.0

func New() *Printer

New creates a new printer.

func (*Printer) Bytes added in v0.15.0

func (p *Printer) Bytes() []byte

Bytes returns the bytes content of printer.

func (*Printer) P added in v0.15.0

func (p *Printer) P(v ...any)

P prints a line to the printer. It converts each parameter to a string following the same rules as fmt.Print. It never inserts spaces between parameters.

func (*Printer) Save added in v0.15.0

func (p *Printer) Save(filename string) error

Save saves the printer content to a file.

func (*Printer) SaveWithGoFormat added in v0.15.0

func (p *Printer) SaveWithGoFormat(filename string) error

SaveWithGoFormat saves the printer content to a file with go format.

func (*Printer) String added in v0.15.0

func (p *Printer) String() string

String returns the string content of printer.

Jump to

Keyboard shortcuts

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