reflects

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(s reflect.Value) reflect.Value

Copy 拷贝

func GetPointer

func GetPointer[T any](src T) reflect.Value

GetPointer 获取指针

func GetPtrUnExportFiled

func GetPtrUnExportFiled(s reflect.Value, filedIndex int) reflect.Value

GetPtrUnExportFiled 获取指针类型的未导出字段

func SetPtrUnExportFiled

func SetPtrUnExportFiled(s reflect.Value, filedIndex int, val reflect.Value)

SetPtrUnExportFiled 设置指针类型的未导出字段

func WrapperFunc added in v0.4.3

func WrapperFunc[Func any](f any, wrapper func(call func([]reflect.Value) []reflect.Value) func(args []reflect.Value) []reflect.Value) (wf Func, err error)

WrapperFunc 包装函数

func WrapperFuncAfter added in v0.4.3

func WrapperFuncAfter[Func any](f Func, after func()) (wf Func, err error)

WrapperFuncAfter 包装函数,后置函数执行后

func WrapperFuncBefore added in v0.4.3

func WrapperFuncBefore[Func any](f Func, before func()) (wf Func, err error)

WrapperFuncBefore 包装函数,前置函数执行前

func WrapperFuncBefore2After added in v0.4.3

func WrapperFuncBefore2After[Func any](f Func, before, after func()) (wf Func, err error)

WrapperFuncBefore2After 包装函数,前置函数执行前,后置函数执行后

Types

This section is empty.

Jump to

Keyboard shortcuts

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