print

package
v0.0.0-...-3948e75 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2020 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultIndent = "\t"

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

type Buffer struct {
	Buf *bytes.Buffer
	Printer
}

Buffer is a convenience wrapper for printing into a byte buffer.

func NewBuffer

func NewBuffer() Buffer

func (*Buffer) Result

func (b *Buffer) Result() ([]byte, error)

type Printer

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

func New

func New(w io.Writer) Printer

func (*Printer) Dedent

func (p *Printer) Dedent()

func (*Printer) Error

func (p *Printer) Error() error

func (*Printer) Indent

func (p *Printer) Indent()

func (*Printer) Linef

func (p *Printer) Linef(format string, args ...interface{})

func (*Printer) NL

func (p *Printer) NL()

func (*Printer) Printf

func (p *Printer) Printf(format string, args ...interface{})

func (*Printer) SetError

func (p *Printer) SetError(err error)

func (*Printer) SetIndentString

func (p *Printer) SetIndentString(indent string)

type TabWriter

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

func NewTabWriter

func NewTabWriter(w io.Writer, minwidth, tabwidth, padding int, padchar byte, flags uint) *TabWriter

func (*TabWriter) Flush

func (p *TabWriter) Flush()

Jump to

Keyboard shortcuts

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