xjstruct

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Capitalize

func Capitalize(str string) string

Capitalize 字符首字母大写

func CopyStruct

func CopyStruct(src, dst interface{})

func CopyStruct2

func CopyStruct2(src, dst interface{})

func DeepFields

func DeepFields(ifaceType reflect.Type) []reflect.StructField

func MapToStructWithOutType

func MapToStructWithOutType(src map[string]interface{}, dst interface{})

*

  • Map转struct
  • @param map 需要初始化的数据,key字段必须与实体类的成员名字一样,否则赋值为空
  • @param entity 需要转化成的实体类
  • @return

func MapToStructWithOutTypeDeep

func MapToStructWithOutTypeDeep(src map[string]interface{}, dst interface{}) interface{}

//Map转struct(包含子struct)

func StructCopy

func StructCopy(DstStructPtr interface{}, SrcStructPtr interface{})

func UnderlineLargeLetters added in v0.7.4

func UnderlineLargeLetters(str 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