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 ¶ type Writer func New(w io.Writer, indent string) *Writer func (w *Writer) Indent(d int) error func (w *Writer) Write(p []byte) (n int, err error) Examples ¶ Package 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) Source Files ¶ View all Source files windent.go Click to show internal directories. Click to hide internal directories.