package
Version:
v1.5.4
Opens a new window with list of versions in this module.
Published: May 4, 2023
License: ISC
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Simple fatal utilities for Go programs.
result, err := doSomething()
die.If(err)
ok := processResult(result)
if !ok {
die.With("failed to process result %s", result.Name)
}
Documentation
¶
Package die contains utilities for fatal error handling.
If prints the error to stderr and exits if err != nil.
func When(cond bool, fstr string, args ...interface{})
When prints the error to stderr and exits if cond is true.
func With(fstr string, args ...interface{})
With prints the message to stderr, appending a newline, and exits.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.