Documentation ¶
Overview ¶
Package subcommandsutil provides the google/subcomonds utility functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cancelable ¶
func Cancelable(sub CancelableCommand) subcommands.Command
Cancelable wraps a subcommands.Command so that it is canceled if its input execution context emits a Done event before execution is finished.
The wrapped sub will calling Dispose before the program exits.
Types ¶
type CancelableCommand ¶
type CancelableCommand interface { subcommands.Command // Dispose provides the gracefully terminate a delegate Command before exiting. Dispose() error }
CancelableCommand is an object that performs tear down. This is used by Cancelable to gracefully terminate a delegate Command before exiting.
Click to show internal directories.
Click to hide internal directories.