util

package
v1.3.18 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// bool
	TypeBooleanValue = 1 << iota
	// string
	TypeStringValue
	// time.Time
	TypeDateTimeValue
	// int8
	TypeBitValue
	// int16
	TypeSmallIntegerValue
	// int32
	TypeInteger32Value
	// int
	TypeIntegerValue
	// int64
	TypeBigIntegerValue
	// uint8
	TypePositiveBitValue
	// uint16
	TypePositiveSmallIntegerValue
	// uint32
	TypePositiveInteger32Value
	// uint
	TypePositiveIntegerValue
	// uint64
	TypePositiveBigIntegerValue
	// float32
	TypeFloatValue
	// float64
	TypeDoubleValue
	// struct
	TypeStructValue
	// slice
	TypeSliceValue
	// map
	TypeMapValue
)

Define the Type enum

Variables

This section is empty.

Functions

func AddSlashes

func AddSlashes(str string) string

AddSlashes() 函数返回在预定义字符之前添加反斜杠的字符串。 预定义字符是: 单引号(') 双引号(") 反斜杠(\)

func GetTypeEnum

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

GetTypeEnum return field type as type constant from reflect.Value

func IsBasicType

func IsBasicType(typeValue int) bool

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 added in v1.2.0

func IsMap(tType reflect.Type) bool

func IsMapType added in v1.2.0

func IsMapType(typeVal int) bool

func IsNil

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

IsNil check value if nil

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 IsSliceType

func IsSliceType(typeValue int) bool

func IsString

func IsString(tType reflect.Type) bool

func IsStruct

func IsStruct(tType reflect.Type) bool

func IsStructType

func IsStructType(typeValue int) bool

func IsUInteger

func IsUInteger(tType reflect.Type) bool

func StripSlashes

func StripSlashes(str string) string

StripSlashes() 函数删除由 AddSlashes() 函数添加的反斜杠。

Types

This section is empty.

Jump to

Keyboard shortcuts

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