retcode

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2022 License: Apache-2.0 Imports: 1 Imported by: 3

README

retcode package for Go

Deterministic process exit codes based on Go errors.

Usage

err := fmt.Errorf("example error")
os.Exit(retcode.Calc(err))

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// LowerBound is the lower bound of the POSIX retcode range. Use this to
	// configure the package.
	LowerBound = 1
	// UpperBound is the upper bound of the POSIX retcode range. Use this to
	// configure the package.
	UpperBound = 255
)

Functions

func Calc

func Calc(err error) int

Calc will calculate an POSIX retcode from an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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