writer

package
v0.0.0-...-040724e Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2019 License: BSD-3-Clause, GPL-2.0 Imports: 3 Imported by: 1

Documentation

Index

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
}

A Writer is a wrapper around an io.Writer to prepend a string to each line

func New

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

New creates a new Writer that wraps a given writer, prepending the given string to each line of output

func (*Writer) Flush

func (a *Writer) Flush() error

Flush outputs any unwritten input

func (*Writer) Printf

func (a *Writer) Printf(format string, args ...interface{}) error

Printf is a convenience function to write formatted output

func (*Writer) Write

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

Write implements an io.Writer

Jump to

Keyboard shortcuts

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