reflect

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetReflectFields

func GetReflectFields(res interface{}) (fields []string)

GetReflectFields 获取结构体列名

func SetValueByTag

func SetValueByTag(result interface{}, tagName string, tagMap map[string]interface{}) error

SetValueByTag 设置结构体某列字段的值

Types

type Info

type Info struct {
	Fields   map[string]interface{}         `json:"fields"`
	ElemInfo map[string]reflect.StructField `json:"elem_info"`
	Size     int64                          `json:"size"`
}

func GetReflectInfo

func GetReflectInfo(res interface{}) (info Info)

Jump to

Keyboard shortcuts

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