omnibus

package module
v0.0.0-...-524301b Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2022 License: MIT Imports: 11 Imported by: 0

README

omnibus

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrConvertType = errors.New("convert type err")
View Source
var ErrMismatchedHashAndPassword = bcrypt.ErrMismatchedHashAndPassword

Functions

func BoolDeref

func BoolDeref(ptr *bool, def bool) bool

func BoolPtr

func BoolPtr(b bool) *bool

func BoolPtrEqual

func BoolPtrEqual(a, b *bool) bool

func Bytes2Str

func Bytes2Str(b []byte) string

func CompareBcryptHashAndPassword

func CompareBcryptHashAndPassword(hashedPassword, password string) error

func DefiniteFloat64

func DefiniteFloat64(value interface{}) float64

func DefiniteInt

func DefiniteInt(value interface{}) int

func DefiniteInt64

func DefiniteInt64(value interface{}) int64

func DefiniteString

func DefiniteString(value interface{}) string

func Duration

func Duration(d time.Duration) *time.Duration

func DurationDeref

func DurationDeref(ptr *time.Duration, def time.Duration) time.Duration

func DurationPtrEqual

func DurationPtrEqual(a, b *time.Duration) bool

func Explode

func Explode(delimiter, text string) []string

func Float32Deref

func Float32Deref(ptr *float32, def float32) float32

func Float32Ptr

func Float32Ptr(f float32) *float32

func Float32PtrEqual

func Float32PtrEqual(a, b *float32) bool

func Float64Deref

func Float64Deref(ptr *float64, def float64) float64

func Float64Ptr

func Float64Ptr(f float64) *float64

func Float64PtrEqual

func Float64PtrEqual(a, b *float64) bool

func GenerateBcryptFromPassword

func GenerateBcryptFromPassword(password string) (string, error)

func Implode

func Implode(glue string, pieces []string) string

func InArray

func InArray(needle interface{}, hystack interface{}) bool

func Int16Deref

func Int16Deref(ptr *int16, def int16) int16

func Int16Ptr

func Int16Ptr(i int16) *int16

func Int16PtrEqual

func Int16PtrEqual(a, b *int16) bool

func Int32Deref

func Int32Deref(ptr *int32, def int32) int32

func Int32Ptr

func Int32Ptr(i int32) *int32

func Int32PtrEqual

func Int32PtrEqual(a, b *int32) bool

func Int64ArrayUnique

func Int64ArrayUnique(arr []int64) []int64

func Int64Deref

func Int64Deref(ptr *int64, def int64) int64

func Int64Ptr

func Int64Ptr(i int64) *int64

func Int64PtrEqual

func Int64PtrEqual(a, b *int64) bool

func Int64sToStrings

func Int64sToStrings(ints []int64) []string

func Int8Deref

func Int8Deref(ptr *int8, def int8) int8

func Int8Ptr

func Int8Ptr(i int8) *int8

func Int8PtrEqual

func Int8PtrEqual(a, b *int8) bool

func IntArrayUnique

func IntArrayUnique(arr []int) []int

func IntDeref

func IntDeref(ptr *int, def int) int

func IntPtr

func IntPtr(i int) *int

func IntPtrEqual

func IntPtrEqual(a, b *int) bool

func IntsToStrings

func IntsToStrings(ints []int) []string

func MD5

func MD5(str string) string

func PasswordHash

func PasswordHash(password string) string

func PasswordVerify

func PasswordVerify(password, hash string) bool

func Str2Bytes

func Str2Bytes(s string) []byte

func StrPadLeft

func StrPadLeft(input string, padLength int, padString string) string

func StringArrayDiff

func StringArrayDiff(array1 []string, arrayOthers ...[]string) []string

func StringArrayUnique

func StringArrayUnique(arr []string) []string

func StringDeref

func StringDeref(ptr *string, def string) string

func StringPtr

func StringPtr(s string) *string

func StringPtrEqual

func StringPtrEqual(a, b *string) bool

func StringsToInt64s

func StringsToInt64s(ss []string) []int64

func StringsToInts

func StringsToInts(ss []string) []int

func ToFloat64

func ToFloat64(value interface{}) (float64, error)

func ToInt

func ToInt(value interface{}) (int, error)

func ToInt64

func ToInt64(value interface{}) (int64, error)

func ToString

func ToString(value interface{}) (string, error)

func Uint16Deref

func Uint16Deref(ptr *uint16, def uint16) uint16

func Uint16Ptr

func Uint16Ptr(i uint16) *uint16

func Uint16PtrEqual

func Uint16PtrEqual(a, b *uint16) bool

func Uint32Deref

func Uint32Deref(ptr *uint32, def uint32) uint32

func Uint32Ptr

func Uint32Ptr(i uint32) *uint32

func Uint32PtrEqual

func Uint32PtrEqual(a, b *uint32) bool

func Uint64Deref

func Uint64Deref(ptr *uint64, def uint64) uint64

func Uint64Ptr

func Uint64Ptr(i uint64) *uint64

func Uint64PtrEqual

func Uint64PtrEqual(a, b *uint64) bool

func Uint8Deref

func Uint8Deref(ptr *uint8, def uint8) uint8

func Uint8Ptr

func Uint8Ptr(i uint8) *uint8

func Uint8PtrEqual

func Uint8PtrEqual(a, b *uint8) bool

func UintDeref

func UintDeref(ptr *uint, def uint) uint

func UintPtr

func UintPtr(i uint) *uint

func UintPtrEqual

func UintPtrEqual(a, b *uint) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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