cmd

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version = "v0.0.0"
	Commit  = "deadbeef"
)

Functions

func CancelOnInterrupt

func CancelOnInterrupt(ctx context.Context, f context.CancelFunc)

CancelOnInterrupt calls f when os.Interrupt or SIGTERM is received. It ignores subsequent interrupts on purpose - program should exit correctly after the first signal.

func Run

func Run(factory RunnableFactory)

Types

type Runnable

type Runnable interface {
	Run(context.Context) error
}

type RunnableFactory

type RunnableFactory func(flagset *pflag.FlagSet, arguments []string) (Runnable, error)

Directories

Path Synopsis
kas

Jump to

Keyboard shortcuts

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