Documentation ¶
Index ¶
- func CastInteger[F Integer, T Integer](from F) T
- func CastIntegers[F Integer, T Integer](from []F) []T
- func ContainInt(vs []int, t int) bool
- func ContainInt32(vs []int32, t int32) bool
- func ContainInt64(vs []int64, t int64) bool
- func ContainUint(vs []uint, t uint) bool
- func ContainUint32(vs []uint32, t uint32) bool
- func ContainUint64(vs []uint64, t uint64) bool
- func DistinctInt(vs []int) (res []int)
- func DistinctInteger[T Integer](vs []T) (res []T)
- func JSONPretty(v interface{}) string
- func JSONString(v interface{}) string
- func MaxInt(a, b int) int
- func MaxInt64(a, b int64) int64
- func MinInt(a, b int) int
- func MinInt64(a, b int64) int64
- func MinUInt64(a, b uint64) uint64
- func NilInterface(v interface{}) bool
- func PanicIf(cond bool, format string, v ...interface{})
- func PanicIfErr(err error, format string, v ...interface{})
- func Ptr[T Integer](v T) *T
- func RunesToBytes(rs []rune) []byte
- type Integer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CastInteger ¶ added in v0.2.0
func CastIntegers ¶ added in v0.2.0
func ContainInt ¶
func ContainInt32 ¶
func ContainInt64 ¶
func ContainUint ¶
func ContainUint32 ¶
func ContainUint64 ¶
func DistinctInt ¶
func DistinctInteger ¶ added in v0.2.0
func DistinctInteger[T Integer](vs []T) (res []T)
func JSONPretty ¶
func JSONPretty(v interface{}) string
func JSONString ¶
func JSONString(v interface{}) string
func NilInterface ¶ added in v0.2.0
func NilInterface(v interface{}) bool
func PanicIf ¶
PanicIf a panic helper to invoke panic when cond is true user/client need responsible for the work of logging/print error detail
func PanicIfErr ¶
PanicIfErr a panic helper to invoke panic when err is not nil user/client need responsible for the work of logging/print error detail
func RunesToBytes ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.