out

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultContext = New()

Functions

func Err

func Err(ctx Context, args ...interface{}) (int, error)

func Errf

func Errf(ctx Context, msg string, args ...interface{}) (int, error)

func Error

func Error(ctx Context, msg string, args ...interface{}) (int, error)

func Out

func Out(ctx Context, args ...interface{}) (int, error)

func Outf

func Outf(ctx Context, msg string, args ...interface{}) (int, error)

func Outln

func Outln(ctx Context, args ...interface{}) (int, error)

func Warning

func Warning(ctx Context, msg string, args ...interface{}) (int, error)

Types

type Context

type Context interface {
	StdOut() io.Writer
	StdErr() io.Writer
	StdIn() io.Reader
}

func New

func New() Context

func NewBuffered

func NewBuffered() (Context, *bytes.Buffer)

func NewFor

func NewFor(ctx Context) Context

func WithErrorOutput

func WithErrorOutput(ctx Context, err io.Writer) Context

func WithInput

func WithInput(ctx Context, in io.Reader) Context

func WithOutput

func WithOutput(ctx Context, out io.Writer) Context

func WithStdIO

func WithStdIO(ctx Context, r io.Reader, o io.Writer, e io.Writer) Context

Jump to

Keyboard shortcuts

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