printer

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Printer

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

Printer prints directives.

func New

func New(w io.Writer) *Printer

New creates a new Printer.

func (*Printer) Format

func (p *Printer) Format(f directives.File) error

Format formats the given file, preserving any text between directives.

func (*Printer) Initialize

func (p *Printer) Initialize(directive []directives.Directive)

Initialize initializes the padding of this printer.

func (*Printer) PrintDirective

func (p *Printer) PrintDirective(directive directives.Directive) (int, error)

PrintDirective prints a directive to the given Writer.

func (*Printer) PrintFile

func (p *Printer) PrintFile(f directives.File) (int, error)

func (*Printer) Write

func (p *Printer) Write(bs []byte) (int, error)

Jump to

Keyboard shortcuts

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