Documentation ¶
Overview ¶
Package cmdcontext provides the "Context" struct which encapsulates all input values and related objects relevant to every execution of the "runner" command.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
Context holds all structs which make up the runtime context of a single execution of the "runner" command. The most commonly-used structs here are the writers:
Out The default writer subcommands should use when writing to standard out. This writer is unlike any other as it will either ignore requests to write to standard out (by default) or will honor them (when the 'verbose' flag is set). VerboseOut The writer subcommands should use when they want to force writing to standard out. The 'version' command, for example, would be cumbersome if the 'verbose' flag were necessary to generate output. Other commands will at times need to generate a minimum level of output. Err The writer to use when generating output related to an error. Note that this writer use the operating system's standard error output, instead of standard out.
type NoopWriter ¶
type NoopWriter struct{}
NoopWriter is an implementation of the standard Writer which takes no action upon being asked to write.
Click to show internal directories.
Click to hide internal directories.