system

package
v0.41.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contextual

type Contextual interface {
	Context() context.Context
}

Contextual returns a context.Context object.

type Environment

type Environment interface {
	Contextual
	Outputs
}

Environment represents a execution environment.

func WithContext

func WithContext(ctx context.Context, env Environment) Environment

WithContext returns a new Environment with the given context.

func WithOutputs

func WithOutputs(out, err io.Writer, env Environment) Environment

WithOutputs returns a new Environment with the given outputs.

type Outputs

type Outputs interface {
	OutOrStdout() io.Writer
	ErrOrStderr() io.Writer
}

Outputs holds current program outputs.

Jump to

Keyboard shortcuts

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