Documentation ¶
Index ¶
- func Assert(cond bool, args ...interface{})
- func Ck(err error, args ...interface{})
- func ErrnoIf(cond bool, errno syscall.Errno, args ...interface{})
- func ExitIf(err, target error, args ...interface{})
- func Halt(rc *int, msg *string)
- func Info(msg interface{}, args ...interface{})
- func Return(err *error, args ...interface{})
- func Uerr(msg interface{}, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Assert ¶
func Assert(cond bool, args ...interface{})
Assert takes a bool and zero or more arguments. If the bool is true, then Assert returns. If the boolean is false, then Assert panics. The panic is of type adaptErr. The adaptErr contains the filename and line number of the caller. The first argument is used as a Sprintf() format string. Any remaining arguments are provided to the Sprintf() as values. The Sprintf() result is stored as adaptErr.msg, to be used later in the adaptErr.Error() string.
func ErrnoIf ¶ added in v0.0.9
ErrnoIf takes a bool and zero or more arguments. If the bool is false, then ErrnoIf returns. If the boolean is true, then ErrnoIf panics. The panic is of type adaptErr. The adaptErr contains the filename and line number of the caller. The first argument must be of type syscall.Errno; the adaptErr wraps the errno. The next argument is used as a Sprintf() format string. Any remaining arguments are provided to the Sprintf() as values. The Sprintf() result is stored as adaptErr.msg, to be used later in the adaptErr.Error() string.
func Return ¶
func Return(err *error, args ...interface{})
convert panic into returned err see https://github.com/lainio/err2 and https://blog.golang.org/go1.13-errors
Types ¶
This section is empty.