stageleft

package
v0.0.0-...-9900226 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: AGPL-3.0-or-later Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NotImplErr = errors.New("not implemented")

Functions

func NotImpled

func NotImpled[T any]() (T, error)

func PanicNotImpled

func PanicNotImpled() error

func ShowPanicTrace

func ShowPanicTrace() string

func WritePanicTrace

func WritePanicTrace(w io.Writer)

Types

type ExitCode

type ExitCode uint8

unix exit codes

const (
	// build your own like this
	ExitSuccess ExitCode = 0
)

func AsExitCode

func AsExitCode(r interface{}, exit ExitCode) ExitCode

extract an exit code or use this one

func ExitCodeFromErr

func ExitCodeFromErr(err error, code ExitCode) ExitCode

attempt to pull an exit code from an error, otherwise use the provided

type ExitCodeError

type ExitCodeError struct {
	Err  error
	Code ExitCode
}

func AttachExitCode

func AttachExitCode(err error, ec ExitCode) ExitCodeError

decorates an error with an exit code

func (ExitCodeError) Error

func (ece ExitCodeError) Error() string

func (ExitCodeError) Unwrap

func (ece ExitCodeError) Unwrap() error

Jump to

Keyboard shortcuts

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