exitstatus

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2018 License: Apache-2.0 Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package exitstatus allows an exit status to be pushed through an error shaped hole. It should not be used to propogate an exit status through a deep callstack as a single error wrapping will cause this to break.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromError

func FromError(err error) int

FromError collects the exit status from the passed error if it exists. If it finds an error without status code information then it returns 1 for backwards compatibility.

Types

type Error

type Error struct {
	Status int
	Err    error
}

Error represents an error and an associated exit status to propogate.

func (*Error) Error

func (e *Error) Error() string

Jump to

Keyboard shortcuts

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