reflect

package
v1.30.34 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsStruct

func IsStruct(typ Kind) bool

func IsZero

func IsZero(v interface{}) bool

func Name

func Name(v interface{}) string

Name return struct string name

func New

func New(v interface{}) interface{}

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

func NewArray

func NewArray(v interface{}) interface{}

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

func Path

func Path(typ reflect.Type, path ...string) string

func ToSlice

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

ToSlice arr must array data array struct data to []interface

func TrueType

func TrueType(typ reflect.Type) reflect.Type

func TrueTypeof

func TrueTypeof(v interface{}) reflect.Type

func TrueTypeofValue

func TrueTypeofValue(v interface{}) (typ reflect.Type, i interface{})

func TrueValue

func TrueValue(typ reflect.Value) reflect.Value

func TrueValueOf

func TrueValueOf(v interface{}) reflect.Value

func ValueOfName added in v1.30.34

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

ValueOfName reflect value via field name

Types

type Kind

type Kind interface {
	Kind() reflect.Kind
}

Jump to

Keyboard shortcuts

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