ioctx

package
v0.11.5 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package ioctx provides a way to pass standard input, output, and error streams through a context.Context.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Stderr

func Stderr(ctx context.Context) io.Writer

Stderr returns the standard error stream for the current context.

func Stdin

func Stdin(ctx context.Context) io.Reader

Stdin returns the standard input stream for the current context.

func Stdout

func Stdout(ctx context.Context) io.Writer

Stdout returns the standard output stream for the current context.

func WithStderr

func WithStderr(ctx context.Context, stderr io.Writer) context.Context

WithStderr returns a new context with the given standard error stream.

func WithStdin

func WithStdin(ctx context.Context, stdin io.Reader) context.Context

WithStdin returns a new context with the given standard input stream.

func WithStdout

func WithStdout(ctx context.Context, stdout io.Writer) context.Context

WithStdout returns a new context with the given standard output stream.

Types

This section is empty.

Jump to

Keyboard shortcuts

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