Help us shape the future of Go! Take the 2026 Go Developer Survey

runtime

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithAppContext

func WithAppContext(ctx context.Context, app *AppContext) context.Context

Types

type AppContext

type AppContext struct {
	// contains filtered or unexported fields
}

func From

func From(ctx context.Context) (*AppContext, bool)

func New

func New(opts Options) (*AppContext, error)

func (*AppContext) AssumeYes

func (a *AppContext) AssumeYes() bool

func (*AppContext) Client

func (a *AppContext) Client() (*client.Client, error)

func (*AppContext) Config

func (a *AppContext) Config() *clitypes.Config

func (*AppContext) EnvID

func (a *AppContext) EnvID() string

func (*AppContext) IsJSON

func (a *AppContext) IsJSON() bool

func (*AppContext) NoColor

func (a *AppContext) NoColor() bool

func (*AppContext) OutputMode

func (a *AppContext) OutputMode() OutputMode

func (*AppContext) RequestTimeout

func (a *AppContext) RequestTimeout() time.Duration

func (*AppContext) UnauthClient

func (a *AppContext) UnauthClient() (*client.Client, error)

type Options

type Options struct {
	EnvOverride    string
	OutputMode     OutputMode
	AssumeYes      bool
	NoColor        bool
	RequestTimeout time.Duration
}

type OutputMode

type OutputMode string
const (
	OutputModeText OutputMode = "text"
	OutputModeJSON OutputMode = "json"
)

Jump to

Keyboard shortcuts

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