reflection

package
v0.0.0-...-2910145 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

reflection包提供了一些内部使用的反射功能。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValueToInterface

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

ValueToInterface 将 reflect 值转换为其接口类型。

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 获取并返回原始 reflect 类型和种类。

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 获取并返回原始 reflect 值和类型。

Jump to

Keyboard shortcuts

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