exit

package module
v0.0.0-...-8dd4a4d Latest Latest
Warning

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

Go to latest
Published: May 25, 2017 License: MIT Imports: 0 Imported by: 0

README

exit

Error makes exit code meaningful

GoDoc Build Status Coverage Status Go Report Card

Description

Inspired from sysexits.h and created it.
The following are quoted contents from manpage of the sysexits.h.

According to style(9), it is not a good practice to call exit(3) with arbitrary values to indicate a failure condition when ending a program. Instead, the pre-defined exit codes from sysexits should be used, so the caller of the process can get a rough estimation about the failure class without looking up the source code.

You can read example.
And if you want to know more details, please read here.

Install

go get github.com/Code-Hex/exit

Contributing

Welcome!!
I'm waiting for pull requests or reporting issues.

License

MIT

Author

CodeHex

Documentation

Index

Constants

View Source
const (
	OK = 0

	USAGE = iota + 63
	DATAERR
	NOINPUT
	NOUSER
	NOHOST
	UNAVAILABLE
	SOFTWARE
	OSERR
	OSFILE
	CANTCREAT
	IOERR
	TEMPFAIL
	PROTOCOL
	NOPERM
	CONFIG
)

Auto generated by `mkerrs` in internal/cmd/mkerrs/main.go Do not edit this.

Variables

This section is empty.

Functions

func MakeCantCreate

func MakeCantCreate(err error) error

MakeCantCreate will return cantcreat struct as error

func MakeConfig

func MakeConfig(err error) error

MakeConfig will return config struct as error

func MakeDataErr

func MakeDataErr(err error) error

MakeDataErr will return dataerr struct as error

func MakeIOErr

func MakeIOErr(err error) error

MakeIOErr will return ioerr struct as error

func MakeNoHost

func MakeNoHost(err error) error

MakeNoHost will return nohost struct as error

func MakeNoInput

func MakeNoInput(err error) error

MakeNoInput will return noinput struct as error

func MakeNoPerm

func MakeNoPerm(err error) error

MakeNoPerm will return noperm struct as error

func MakeNoUser

func MakeNoUser(err error) error

MakeNoUser will return nouser struct as error

func MakeOK

func MakeOK(err error) error

MakeOK will return ok struct as error

func MakeOSErr

func MakeOSErr(err error) error

MakeOSErr will return oserr struct as error

func MakeOSFile

func MakeOSFile(err error) error

MakeOSFile will return osfile struct as error

func MakeProtocol

func MakeProtocol(err error) error

MakeProtocol will return protocol struct as error

func MakeSoftWare

func MakeSoftWare(err error) error

MakeSoftWare will return software struct as error

func MakeTempFail

func MakeTempFail(err error) error

MakeTempFail will return tempfail struct as error

func MakeUnAvailable

func MakeUnAvailable(err error) error

MakeUnAvailable will return unavailable struct as error

func MakeUsage

func MakeUsage(err error) error

MakeUsage will return usage struct as error

Types

This section is empty.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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