package
0.1.0
Repository: https://github.com/donetkit/gtool.git
Documentation: pkg.go.dev

# Functions

Bool converts `any` to bool.
Byte converts `any` to byte.
Bytes converts `any` to []byte.
Convert converts the variable `fromValue` to the type `toTypeName`, the type `toTypeName` is specified by string.
Duration converts `any` to time.Duration.
Float32 converts `any` to float32.
Float32s converts `any` to []float32.
Float64 converts `any` to float64.
Float64s converts `any` to []float64.
Floats converts `any` to []float64.
GTime converts `any` to *gtime.Time.
Int converts `any` to int.
Int16 converts `any` to int16.
Int32 converts `any` to int32.
Int32s converts `any` to []int32.
Int64 converts `any` to int64.
Int64s converts `any` to []int64.
Int8 converts `any` to int8.
Interfaces converts `any` to []interface{}.
Ints converts `any` to []int.
Map converts any variable `value` to map[string]interface{}.
MapDeep does Map function recursively, which means if the attribute of `value` is also a struct/*struct, calls Map function on this attribute converting it to a map[string]interface{} type variable.
Maps converts `value` to []map[string]interface{}.
MapsDeep converts `value` to []map[string]interface{} recursively.
MapStrStr converts `value` to map[string]string.
MapStrStrDeep converts `value` to map[string]string recursively.
MapToMap converts any map type variable `params` to another map type variable `pointer` using reflect.
MapToMaps converts any slice type variable `params` to another map slice type variable `pointer`.
Rune converts `any` to rune.
Runes converts `any` to []rune.
Scan automatically checks the type of `pointer` and converts `params` to `pointer`.
ScanList converts `structSlice` to struct slice which contains other complex struct attributes.
SliceAny is alias of Interfaces.
SliceFloat is alias of Floats.
SliceFloat32 is alias of Float32s.
SliceFloat64 is alias of Float64s.
SliceInt is alias of Ints.
SliceInt32 is alias of Int32s.
SliceInt64 is alias of Int64s.
SliceMap is alias of Maps.
SliceMapDeep is alias of MapsDeep.
SliceStr is alias of Strings.
SliceStruct is alias of Structs.
SliceUint is alias of Uints.
SliceUint32 is alias of Uint32s.
SliceUint64 is alias of Uint64s.
String converts `any` to string.
Strings converts `any` to []string.
Struct maps the params key-value pairs to the corresponding struct object's attributes.
Structs converts any slice to given struct slice.
StructsTag acts as Structs but also with support for priority tag feature, which retrieves the specified tags for `params` key-value items to struct attribute names mapping.
StructTag acts as Struct but also with support for priority tag feature, which retrieves the specified tags for `params` key-value items to struct attribute names mapping.
Time converts `any` to time.Time.
Uint converts `any` to uint.
Uint16 converts `any` to uint16.
Uint32 converts `any` to uint32.
Uint32s converts `any` to []uint32.
Uint64 converts `any` to uint64.
Uint64s converts `any` to []uint64.
Uint8 converts `any` to uint8.
Uints converts `any` to []uint.
UnsafeBytesToStr converts []byte to string without memory copy.
UnsafeStrToBytes converts string to []byte without memory copy.

# Variables

StructTagPriority defines the default priority tags for Map*/Struct* functions.