command

package
v0.26.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CLIContextFromContext

func CLIContextFromContext(ctx context.Context) *cli.Context

CLIContextFromContext returns a pointer to a cli.Context It panics when the cli.Context is not set.

func InjectContext

func InjectContext(injectedCtx context.Context, fn func(context.Context) error, middleware ...func(context.Context) (context.Context, error)) cli.ActionFunc

InjectContext injects an existing Context as the first middleware and then wraps a function with middleware using that context. It returns a cli.ActionFunc with the cli.Context added to the Context. By injecting the existing context as the first middleware, we ensure that it's the Context all later middlewares operate on.

Types

This section is empty.

Jump to

Keyboard shortcuts

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