indented

package
v0.0.0-...-9eda336 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 2 Imported by: 14

Documentation

Index

Constants

View Source
const Limit = 256

Limit is the maximum value of Level.

Variables

This section is empty.

Functions

This section is empty.

Types

type Writer

type Writer struct {
	io.Writer      // underlying writer.
	Level     int  // number of times \t must be inserted before each line.
	UseSpaces bool // true iff Level is the number of spaces instead of tabs.
	Width     int  // number of whitespace characters in each level. Defaults to 1.
	// contains filtered or unexported fields
}

Writer inserts indentation before each line.

func (*Writer) Write

func (w *Writer) Write(data []byte) (n int, err error)

Write writes data inserting a newline before each line. Panics if w.Indent is outside of [0, Limit) range.

Jump to

Keyboard shortcuts

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