plugio

package
v0.0.0-...-289cda9 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2020 License: MIT Imports: 3 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Stderr

func Stderr(plugs ...plugins.Plugin) io.Writer

Stderr returns a io.MultiWriter containing all plugins that implement Errer. If none are found, then os.Stderr is returned

func Stdin

func Stdin(plugs ...plugins.Plugin) io.Reader

Stdin returns a io.MultiReader containing all plugins that implement Inner. If none are found, then os.Stdin is returned

func Stdout

func Stdout(plugs ...plugins.Plugin) io.Writer

Stdout returns a io.MultiWriter containing all plugins that implement Outer. If none are found, then os.Stdout is returned

Types

type ErrNeeder

type ErrNeeder interface {
	SetStderr(io.Writer) error
}

type Errer

type Errer interface {
	plugins.Plugin
	Stderr() io.Writer
}

func NewErrer

func NewErrer(r io.Writer) Errer

NewErrer converts an io.Writer to an Outer plugin.

type InNeeder

type InNeeder interface {
	SetStdin(io.Reader) error
}

type Inner

type Inner interface {
	plugins.Plugin
	Stdin() io.Reader
}

func NewInner

func NewInner(r io.Reader) Inner

NewInner converts an io.Reader to an Inner plugin.

type OutNeeder

type OutNeeder interface {
	SetStdout(io.Writer) error
}

type Outer

type Outer interface {
	plugins.Plugin
	Stdout() io.Writer
}

func NewOuter

func NewOuter(r io.Writer) Outer

NewOuter converts an io.Writer to an Outer plugin.

Jump to

Keyboard shortcuts

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