ref

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package ref 反射扩展

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPath

func GetPath[T interface{}]() string

GetPath 获取类型名称

func GetPathByValue

func GetPathByValue(table interface{}) string

GetPathByValue 获取类型名称

func IsInherit

func IsInherit[TSource any, Target any]() bool

IsInherit 判断 TSource 是否继承 Target

func IsPointer

func IsPointer(param interface{}) bool

IsPointer 判断是否是指针

func IsPointerReturnValue

func IsPointerReturnValue(param interface{}) (interface{}, bool)

IsPointerReturnValue 判断是否是指针,并返回真实值

func IsType

func IsType[TSource any, Target any]() (*TSource, *Target, bool)

IsType 判断 TSource 是否等于或者实现 Target

func IsTypeByValue

func IsTypeByValue[T any](value any) (*T, bool)

IsTypeByValue 判断 value 是否等于或者实现 T

Types

This section is empty.

Jump to

Keyboard shortcuts

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