Version: v0.3.0 Latest Latest

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

Go to latest
Published: Mar 7, 2020 License: BSD-3-Clause Imports: 3 Imported by: 0



Package cmdstate manages a running command state (the exit status).



This section is empty.


This section is empty.


func AtExit

func AtExit(f func())

AtExit will call f when Exit is called.

func Errorf

func Errorf(format string, args ...interface{})

Errorf prints the formatted message on os.Stderr and set the exit status to 1.

func Exit

func Exit()

Exit calls os.Exit with the exit status as set by SetExitStatus. It calls all the function registered by AtExit in FIFO order.

func ExitIfErrors

func ExitIfErrors()

ExitIfErrors will exit if the current exit status is not 0.

func Fatalf

func Fatalf(format string, args ...interface{})

Fatalf prints the formatted message on os.Stderr and exit with exit status 1.

func GetExitStatus

func GetExitStatus() int

GetExitStatus returns the current exit status.

func SetExitStatus

func SetExitStatus(n int)

SetExitStatus sets the exit status to n.


This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL