Documentation ¶
Overview ¶
Package must is a convenience wrapper for extracting useful information out of (data, error) tuples when you really just want the data and exiting on errors is acceptable.
Index ¶
- func Any(i interface{}, e error) interface{}
- func Float64(f float64, e error) float64
- func Int(i int, e error) int
- func Int64(i int64, e error) int64
- func Result(r *sql.Result, e error) *sql.Result
- func Rows(r *sql.Rows, e error) *sql.Rows
- func ShouldIncludeStackTrace(include bool)
- func String(s string, e error) string
- func Uint(u uint, e error) uint
- func Uint64(u uint64, e error) uint64
- func Work(e error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Any ¶
func Any(i interface{}, e error) interface{}
Any returns the interface{} i or logs a fatal error e.
func ShouldIncludeStackTrace ¶
func ShouldIncludeStackTrace(include bool)
ShouldIncludeStackTrace controles whether or not calling die will also produce a stack trace when failing. It sets a global variable so best practice is to set it once at the entry point of the application using must.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.