out

package
v0.54.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: Apache-2.0 Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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