wrind

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Example
iw := New(os.Stdout, "..")
fmt.Fprintln(iw, "foo")
iw.Indent(1)
fmt.Fprintln(iw, "bar")
iw.Indent(-1)
fmt.Fprint(iw, "baz")
Output:

foo
..bar
baz

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Writer

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

func New

func New(w io.Writer, indent string) *Writer

func (*Writer) Indent

func (w *Writer) Indent(d int) error

func (*Writer) Write

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

Jump to

Keyboard shortcuts

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