subcommandsutil

package module
v0.0.0-...-caeda1c Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2021 License: BSD-3-Clause Imports: 5 Imported by: 0

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.

Jump to

Keyboard shortcuts

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