Documentation
¶
Index ¶
- func Assert(express interface{}, v interface{}, msg ...string)
- func Compare(v1 interface{}, v2 interface{}, comparer ...CompareFunc) int
- func Each(items interface{}, fn EachFunc)
- func EachMap(items map[string]interface{}, fn EachFunc)
- func EachSlice(items []interface{}, fn EachFunc)
- func EachStruct(items *struct{}, fn EachFunc)
- func Equired(v1 interface{}, v2 interface{}, comparer ...CompareFunc) bool
- func Find(items []interface{}, fn FilterFunc) interface{}
- func FindIndex(items []interface{}, fn FilterFunc) int
- func FindTagValue(tag reflect.StructTag, field string) interface{}
- func If(express bool, trueValue, falseValue interface{}) interface{}
- func If_bool(express bool, trueValue, falseValue bool) bool
- func If_byte(express bool, trueValue, falseValue byte) byte
- func If_float(express bool, trueValue, falseValue float32) float32
- func If_float64(express bool, trueValue, falseValue float64) float64
- func If_int(express bool, trueValue, falseValue int) int
- func If_int8(express bool, trueValue, falseValue int8) int8
- func If_int16(express bool, trueValue, falseValue int8) int8
- func If_int32(express bool, trueValue, falseValue int32) int32
- func If_int64(express bool, trueValue, falseValue int64) int64
- func If_method(express bool, trueMethod, falseMethod func())
- func If_str(express bool, trueValue, falseValue string) string
- func If_uint(express bool, trueValue, falseValue uint) uint
- func If_uint8(express bool, trueValue, falseValue uint8) uint8
- func If_uint16(express bool, trueValue, falseValue uint16) uint16
- func If_uint32(express bool, trueValue, falseValue uint32) uint32
- func If_uint64(express bool, trueValue, falseValue uint64) uint64
- func Map(items interface{}, fn MapFunc) interface{}
- func MapMap(items map[string]interface{}, fn MapFunc) map[string]interface{}
- func MapSlice(items []interface{}, fn MapFunc) []interface{}
- func MapStruct(items *struct{}, fn MapFunc) map[string]interface{}
- func Max(value1, value2 interface{}) interface{}
- func MaxEx(values ...interface{}) interface{}
- func Min(value1, value2 interface{}) interface{}
- func MinEx(values ...interface{}) interface{}
- func ParseTag(tag reflect.StructTag) map[string]interface{}
- func Thown(msg string, code int)
- func TryCatch(try func(), catch func(err XError, args ...interface{}))
- func TryFinally(try func(), finally func(...interface{}))
- type A
- type AM
- type CompareFunc
- type EachFunc
- type FilterFunc
- type M
- type MapFunc
- type O
- type XError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Assert ¶
func Assert(express interface{}, v interface{}, msg ...string)
条件中断,如果express != v 时中断
func EachStruct ¶
func EachStruct(items *struct{}, fn EachFunc)
func Find ¶
func Find(items []interface{}, fn FilterFunc) interface{}
func FindIndex ¶
func FindIndex(items []interface{}, fn FilterFunc) int
func FindTagValue ¶
查找值StructTag中的键值
func If_float64 ¶
Types ¶
type FilterFunc ¶
type FilterFunc func(item interface{}, indexOrKey interface{}) bool
type MapFunc ¶
type MapFunc func(item interface{}, indexOrKey interface{}, args ...interface{}) interface{}
Click to show internal directories.
Click to hide internal directories.