reflection

package
v2.9.7 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package reflection provides some reflection functions for internal usage.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValueToInterface

func ValueToInterface(v reflect.Value) (value any, 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 any) (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 any) (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