convert

package
v0.0.0-...-2946602 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInterfaceToString

func GetInterfaceToString(value interface{}) string

func OneToManyCombinationConvert

func OneToManyCombinationConvert(one, many []interface{}, combColumnName string) []interface{}

OneToManyCombinationConvert 一对多合并

func SliceConvert

func SliceConvert(slice interface{}, newSlice interface{}) (interface{}, error)

SliceConvert 数组类型转换

此处用了大量反射,高并发情况下将导致性能瓶颈

func StructSliceToTagString

func StructSliceToTagString(instance interface{}, tag string) string

func StructToTagMap

func StructToTagMap(instance interface{}, tag string) (map[string]interface{}, error)

StructToTagMap 结构体根据指定tag转map

并没有递归深入展开嵌套结构体

func StructToTagString

func StructToTagString(instance interface{}, tag string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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