util

package
v1.3.79 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Key       = "key"
	Auto      = "auto"
	UUID      = "uuid"
	SnowFlake = "snowflake"
	DateTime  = "dateTime"
)

Variables

This section is empty.

Functions

func GetBool

func GetBool(val any) (ret bool, err error)

func GetCurrentDateTime

func GetCurrentDateTime() (ret time.Time)

func GetCurrentDateTimeStr

func GetCurrentDateTimeStr() (ret string)

func GetDateTimeDt

func GetDateTimeDt(val any) (ret time.Time, err error)

func GetDateTimeStr

func GetDateTimeStr(val any) (ret string, err error)

func GetFloat32

func GetFloat32(val any) (ret float32, err error)

func GetFloat64

func GetFloat64(val any) (ret float64, err error)

func GetInt

func GetInt(val any) (ret int, err error)

func GetInt16

func GetInt16(val any) (ret int16, err error)

func GetInt32

func GetInt32(val any) (ret int32, err error)

func GetInt64

func GetInt64(val any) (ret int64, err error)

func GetInt8

func GetInt8(val any) (ret int8, err error)

func GetNewSnowFlakeID

func GetNewSnowFlakeID() (ret int64)

func GetNewUUID

func GetNewUUID() (ret string)

func GetString

func GetString(val any) (ret string, err error)

func GetTypeEnum

func GetTypeEnum(val reflect.Type) (ret model.TypeDeclare, err error)

func GetUint

func GetUint(val any) (ret uint64, err error)

func GetUint16

func GetUint16(val any) (ret uint16, err error)

func GetUint32

func GetUint32(val any) (ret uint32, err error)

func GetUint64

func GetUint64(val any) (ret uint64, err error)

func GetUint8

func GetUint8(val any) (ret uint8, err error)

func IsBool

func IsBool(tType reflect.Type) bool

func IsDateTime

func IsDateTime(tType reflect.Type) bool

func IsFloat

func IsFloat(tType reflect.Type) bool

func IsInteger

func IsInteger(tType reflect.Type) bool

func IsMap

func IsMap(tType reflect.Type) bool

func IsNil

func IsNil(val reflect.Value) (ret bool)

IsNil check value if nil

func IsNumber

func IsNumber(tType reflect.Type) bool

func IsPtr

func IsPtr(tType reflect.Type) bool

func IsSameVal

func IsSameVal(firstVal, secondVal reflect.Value) (ret bool, err error)

IsSameVal is same value

func IsSlice

func IsSlice(tType reflect.Type) bool

func IsString

func IsString(tType reflect.Type) bool

func IsStruct

func IsStruct(tType reflect.Type) bool

func IsUInteger

func IsUInteger(tType reflect.Type) bool

func IsZero

func IsZero(val reflect.Value) (ret bool)

Types

This section is empty.

Jump to

Keyboard shortcuts

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