reflectx

package
v0.0.0-...-8cd3f9c Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2025 License: GPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNil

func IsNil(x interface{}) bool

IsNil 是否nil

func IsPointerToStruct

func IsPointerToStruct(v interface{}) bool

IsPointerToStruct 判断变量是否是指向结构体的指针

func IsPointerZero

func IsPointerZero(p unsafe.Pointer, typ reflect.Type) bool

IsPointerZero 判断unsafe.Pointer指向数据是否零值

func IsPtr

func IsPtr(v interface{}) bool

IsPtr 判断变量是否指针

func IsStruct

func IsStruct(v interface{}) bool

IsStruct 判断变量是否结构体

func IsStructOrPointerToStruct

func IsStructOrPointerToStruct(v interface{}) bool

IsStructOrPointerToStruct 是否struct指向struct的指针

func IsStructZero

func IsStructZero(v interface{}) bool

IsStructZero 是否struct零值

func IsZeroValue

func IsZeroValue(i interface{}) bool

IsZeroValue 是否是零值

func SetStructFieldVal

func SetStructFieldVal(structPtr interface{}, fieldName string, val interface{})

SetStructFieldVal 设置结构体字段值 structPtr 结构体指针 fieldName 字段名称 val 目标值

Types

This section is empty.

Jump to

Keyboard shortcuts

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