iostream

package
Version: v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Std = StdWriters{
	Stdout: os.Stdout,
	Stderr: os.Stderr,
}

Functions

func NewLazyFile

func NewLazyFile(filename string) io.WriteCloser

func Tee

func Tee(r io.Reader, ws ...io.Writer) error

Tee redirects r to ws

Types

type Null added in v0.2.3

type Null struct{}

Null implements /dev/null

func (*Null) Write added in v0.2.3

func (w *Null) Write(bs []byte) (int, error)

type SaveFirstdWriter added in v0.2.3

type SaveFirstdWriter struct {
	First string
}

SaveFirstdWriter remembers the content of the first Write call

func (*SaveFirstdWriter) Write added in v0.2.3

func (w *SaveFirstdWriter) Write(bs []byte) (int, error)

type StdReaders

type StdReaders struct {
	Stdout io.Reader
	Stderr io.Reader
}

func (*StdReaders) Stream

func (r *StdReaders) Stream(ws ...*StdWriters) interface{ Wait() }

type StdWriters

type StdWriters struct {
	Stdout io.Writer
	Stderr io.Writer
}

func NewFileRedirector

func NewFileRedirector(name string) *StdWriters

func NewXTermRedirector

func NewXTermRedirector(name string, c xterm.Color) *StdWriters

type XtermWriter

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

func (XtermWriter) Write

func (x XtermWriter) Write(bs []byte) (int, error)

Jump to

Keyboard shortcuts

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