Documentation ¶
Overview ¶
Package gutil provides utility functions.
Index ¶
- func ComparatorByte(a, b interface{}) int
- func ComparatorFloat32(a, b interface{}) int
- func ComparatorFloat64(a, b interface{}) int
- func ComparatorInt(a, b interface{}) int
- func ComparatorInt16(a, b interface{}) int
- func ComparatorInt32(a, b interface{}) int
- func ComparatorInt64(a, b interface{}) int
- func ComparatorInt8(a, b interface{}) int
- func ComparatorRune(a, b interface{}) int
- func ComparatorString(a, b interface{}) int
- func ComparatorTime(a, b interface{}) int
- func ComparatorUint(a, b interface{}) int
- func ComparatorUint16(a, b interface{}) int
- func ComparatorUint32(a, b interface{}) int
- func ComparatorUint64(a, b interface{}) int
- func ComparatorUint8(a, b interface{}) int
- func Dump(i ...interface{})
- func Export(i ...interface{}) string
- func IsEmpty(value interface{}) bool
- func PrintBacktrace()
- func Throw(exception interface{})
- func TryCatch(try func(), catch ...func(exception interface{}))
- type Comparator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComparatorByte ¶
func ComparatorByte(a, b interface{}) int
ComparatorByte provides a basic comparison on byte.
func ComparatorFloat32 ¶
func ComparatorFloat32(a, b interface{}) int
ComparatorFloat32 provides a basic comparison on float32.
func ComparatorFloat64 ¶
func ComparatorFloat64(a, b interface{}) int
ComparatorFloat64 provides a basic comparison on float64.
func ComparatorInt ¶
func ComparatorInt(a, b interface{}) int
ComparatorInt provides a basic comparison on int.
func ComparatorInt16 ¶
func ComparatorInt16(a, b interface{}) int
ComparatorInt16 provides a basic comparison on int16.
func ComparatorInt32 ¶
func ComparatorInt32(a, b interface{}) int
ComparatorInt32 provides a basic comparison on int32.
func ComparatorInt64 ¶
func ComparatorInt64(a, b interface{}) int
ComparatorInt64 provides a basic comparison on int64.
func ComparatorInt8 ¶
func ComparatorInt8(a, b interface{}) int
ComparatorInt8 provides a basic comparison on int8.
func ComparatorRune ¶
func ComparatorRune(a, b interface{}) int
ComparatorRune provides a basic comparison on rune.
func ComparatorString ¶
func ComparatorString(a, b interface{}) int
ComparatorString provides a fast comparison on strings.
func ComparatorTime ¶
func ComparatorTime(a, b interface{}) int
ComparatorTime provides a basic comparison on time.Time.
func ComparatorUint ¶
func ComparatorUint(a, b interface{}) int
ComparatorUint provides a basic comparison on uint.
func ComparatorUint16 ¶
func ComparatorUint16(a, b interface{}) int
ComparatorUint16 provides a basic comparison on uint16.
func ComparatorUint32 ¶
func ComparatorUint32(a, b interface{}) int
ComparatorUint32 provides a basic comparison on uint32.
func ComparatorUint64 ¶
func ComparatorUint64(a, b interface{}) int
ComparatorUint64 provides a basic comparison on uint64.
func ComparatorUint8 ¶
func ComparatorUint8(a, b interface{}) int
ComparatorUint8 provides a basic comparison on uint8.
func Dump ¶
func Dump(i ...interface{})
Dump prints variables <i...> to stdout with more manually readable.
func Export ¶
func Export(i ...interface{}) string
Export returns variables <i...> as a string with more manually readable.
func IsEmpty ¶
func IsEmpty(value interface{}) bool
IsEmpty checks given <value> empty or not. It returns false if <value> is: integer(0), bool(false), slice/map(len=0), nil; or else returns true.
func PrintBacktrace ¶ added in v1.5.0
func PrintBacktrace()
PrintBacktrace prints the caller backtrace to stdout.
Types ¶
type Comparator ¶
type Comparator func(a, b interface{}) int
Comparator is a function that compare a and b, and returns the result as int.
Should return a number:
negative , if a < b zero , if a == b positive , if a > b