assert

package module
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: May 6, 2019 License: MIT Imports: 6 Imported by: 14

README

assert

assert for go

Documentation

Index

Constants

This section is empty.

Variables

View Source
var True = Bool

Functions

func Bool

func Bool(b bool, msg string, args ...interface{})

func DirExists added in v0.0.8

func DirExists(path string) bool

func Err

func Err(err error)

func ErrWrap added in v0.1.4

func ErrWrap(err error, format string, args ...interface{})

func FileExists added in v0.0.8

func FileExists(path string) bool

func If added in v0.0.4

func If(b bool, t, f interface{}) interface{}

func IfEquals added in v0.0.4

func IfEquals(args ...interface{}) bool

func IfIn added in v0.0.4

func IfIn(a interface{}, args ...interface{}) bool

func IfNil added in v0.1.4

func IfNil(b interface{}, t, f interface{}) interface{}

func IfNotIn added in v0.0.4

func IfNotIn(a interface{}, args ...interface{}) bool

func P

func P(d ...interface{})

func Type added in v0.1.3

func Type(err interface{})

Types

type KErr added in v0.0.13

type KErr struct {
	Msg        string `json:"msg,omitempty"`
	FuncCaller string `json:"funcCaller,omitempty"`
	Sub        *KErr  `json:"sub,omitempty"`
	Err        error  `json:"err,omitempty"`
}

func ErrOf added in v0.1.4

func ErrOf(msg string, args ...interface{}) *KErr

func (*KErr) Error added in v0.0.13

func (t *KErr) Error() string

func (*KErr) P added in v0.1.4

func (t *KErr) P()

func (*KErr) Panic added in v0.1.3

func (t *KErr) Panic()

Jump to

Keyboard shortcuts

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