Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CLIContextFromContext ¶
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.
Click to show internal directories.
Click to hide internal directories.