explain

package
v1.13.3-k3s2 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Formatter

type Formatter struct {
	IndentLevel int
	Wrap        int
	Writer      io.Writer
}

Formatter helps you write with indentation, and can wrap text as needed.

func (Formatter) Indent

func (f Formatter) Indent(indent int) *Formatter

Indent creates a new Formatter that will indent the code by that much more.

func (*Formatter) Write

func (f *Formatter) Write(str string, a ...interface{}) error

Write writes a string with the indentation set for the Formatter. This is not wrapping text.

func (*Formatter) WriteWrapped

func (f *Formatter) WriteWrapped(str string, a ...interface{}) error

WriteWrapped writes a string with the indentation set for the Formatter, and wraps as needed.

Jump to

Keyboard shortcuts

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