Reflect

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetField

func GetField(obj interface{}, name string) (i interface{}, err error)

func IsArray added in v1.0.1

func IsArray(data interface{}) bool

func IsBytes added in v1.0.2

func IsBytes(data interface{}) bool

func IsMap added in v1.0.1

func IsMap(data interface{}) bool

func IsSlice added in v1.0.1

func IsSlice(data interface{}) bool

func IsString added in v1.0.1

func IsString(data interface{}) bool

func MakeValueType

func MakeValueType(ptr reflect.Type) reflect.Type

MakeValueType 将ptr类型的Type转换为val类型的Type

func SetField

func SetField(obj interface{}, name string, value interface{}) error

SetField 使用反射设置结构体字段的值,obj必须是个指针类型

Types

This section is empty.

Jump to

Keyboard shortcuts

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