reflectx

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: MIT Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InvalidValue = reflect.Value{}
	InvalidType  = reflect.TypeOf(nil)
)

Functions

func Deref

func Deref(t reflect.Type) reflect.Type

Deref returns the basic type of t

func Indirect

func Indirect(v any) reflect.Value

Indirect deref all level pointer references

func IndirectNew added in v0.0.6

func IndirectNew(v any) reflect.Value

IndirectNew returns the indirect value of v this function is safe and WILL NOT trigger panic. if the input is invalid, InvalidValue returns. validation of return is recommended.

func IsBytes

func IsBytes(v any) bool

func IsFloat added in v0.0.3

func IsFloat(v any) bool

func IsInteger added in v0.0.3

func IsInteger(v any) bool

func IsNumeric added in v0.0.3

func IsNumeric(v any) bool

func IsZero

func IsZero(v any) bool

IsZero check if input v is zero

func New

func New(t reflect.Type) reflect.Value

New a `reflect.Value` with reflect.Type not like reflect.New, but new all level pointer ref

func NewElem

func NewElem(t reflect.Type) reflect.Value

NewElem new the indirect type of t

func ParseStructTag

func ParseStructTag(tag string) map[string]string

func ParseTagKeyAndFlags

func ParseTagKeyAndFlags(tag string) (string, map[string]struct{})

func Typename

func Typename(rt reflect.Type) string

Typename returns the full type name of rt

Types

This section is empty.

Jump to

Keyboard shortcuts

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