reflection

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeepCopyByGob added in v2.2.5

func DeepCopyByGob(dst, src any) error

DeepCopyByGob 深拷贝

func IsSameDeepEqual added in v2.2.5

func IsSameDeepEqual(a, b any) bool

IsSameDeepEqual 判断两个值是否相同

func IsSameType added in v2.2.5

func IsSameType(a, b any) bool

IsSameType 判断两个类型是否相同

func ValueToInterface

func ValueToInterface(v reflect.Value) (value interface{}, ok bool)

ValueToInterface converts reflect value to its interface type.

Types

type OriginTypeAndKindOutput

type OriginTypeAndKindOutput struct {
	InputType  reflect.Type
	InputKind  reflect.Kind
	OriginType reflect.Type
	OriginKind reflect.Kind
}

func OriginTypeAndKind

func OriginTypeAndKind(value interface{}) (out OriginTypeAndKindOutput)

OriginTypeAndKind retrieves and returns the original reflect type and kind.

type OriginValueAndKindOutput

type OriginValueAndKindOutput struct {
	InputValue  reflect.Value
	InputKind   reflect.Kind
	OriginValue reflect.Value
	OriginKind  reflect.Kind
}

func OriginValueAndKind

func OriginValueAndKind(value interface{}) (out OriginValueAndKindOutput)

OriginValueAndKind retrieves and returns the original reflect value and kind.

Jump to

Keyboard shortcuts

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