reflect

package
v1.30.10 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDataByFieldName

func GetDataByFieldName(data interface{}, filedName string) (interface{}, error)

reflect value via field name

func IsZero added in v1.20.6

func IsZero(v interface{}) bool

func New added in v1.20.0

func New(v interface{}) interface{}

New returns a Value representing a pointer to a new zero value

func NewArray added in v1.20.6

func NewArray(v interface{}) interface{}

NewArray returns a []Value representing a pointer to a new zero value

func StructName added in v1.20.6

func StructName(st interface{}) string

return struct string name

func ToMap added in v1.8.6

func ToMap(st interface{}) map[string]interface{}

struct to map

func ToSlice

func ToSlice(arr interface{}) []interface{}

arr must array data array struct data to []interface

Types

This section is empty.

Jump to

Keyboard shortcuts

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