reflect

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FieldName

func FieldName(data any, filedName string) (any, error)

FieldName reflect value via field name

func IsStruct

func IsStruct(typ Kind) bool

func IsZero

func IsZero(v any) bool

func Name

func Name(v any) string

Name return struct string name

func New

func New(v any) any

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

func NewArray

func NewArray(v any) any

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 any) []any

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

func TrueType

func TrueType(typ reflect.Type) reflect.Type

func TrueTypeof

func TrueTypeof(v any) reflect.Type

func TrueTypeofValue

func TrueTypeofValue(v any) (typ reflect.Type, i any)

func TrueValue

func TrueValue(typ reflect.Value) reflect.Value

func TrueValueOf

func TrueValueOf(v any) reflect.Value

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