cmd

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2018 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TerminationSignals = []os.Signal{
	syscall.SIGINT,
	syscall.SIGTERM,
}

TODO: We may want to consider expanding this list.

Functions

func Error

func Error(err error)

func Fatal

func Fatal(err error)

func Mainify added in v0.3.0

func Mainify(entry func(*cobra.Command, []string) error) func(*cobra.Command, []string)

Mainify is a small utility that wraps a non-standard Cobra entry point (one returning an error) and generates a standard Cobra entry point. It's useful for entry points to be able to rely on defer-based cleanup, which doesn't occur if the entry point terminates the process. This method allows the entry point to indicate an error while still performing cleanup.

func Warning

func Warning(message string)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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