Documentation ¶
Index ¶
- func DefaultIfNil(value, defaultValue interface{}) interface{}
- func First(args ...interface{}) interface{}
- func FirstNotNil(values ...interface{}) interface{}
- func IfThen(condition bool, value interface{}) interface{}
- func IfThenElse(condition bool, value1, value2 interface{}) interface{}
- func Last(args ...interface{}) interface{}
- func PanicIfErr(value interface{}, err error) interface{}
- func Second(args ...interface{}) interface{}
- func Third(args ...interface{}) interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultIfNil ¶
func DefaultIfNil(value, defaultValue interface{}) interface{}
DefaultIfNil returns value if it is not nil, otherwise returns defaultValue.
func First ¶
func First(args ...interface{}) interface{}
First returns the first element of args, panics if out of range.
func FirstNotNil ¶
func FirstNotNil(values ...interface{}) interface{}
FirstNotNil returns the first value which is not nil.
func IfThen ¶
func IfThen(condition bool, value interface{}) interface{}
IfThen returns value if condition is true, otherwise returns nil.
func IfThenElse ¶
func IfThenElse(condition bool, value1, value2 interface{}) interface{}
IfThenElse returns value1 if condition is true, otherwise returns value2.
func Last ¶
func Last(args ...interface{}) interface{}
Last returns the last element of args, panics if out of range.
func PanicIfErr ¶
func PanicIfErr(value interface{}, err error) interface{}
PanicIfErr returns value if err is nil, otherwise panics with error message.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.