Documentation
¶
Index ¶
- func FuncEqual(fn1, fn2 any) bool
- func GetFuncName(fn any) string
- func GetFuncSignature(fn any) string
- func GetStructName(obj any) string
- func GetVarName(v any) string
- func MatchReceiverMethods(receiver any, matchFn any) map[string]any
- func StructSet(obj any, nilField any, val any) error
- type Utils
- type Value
- type ValueItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MatchReceiverMethods ¶
MatchReceiverMethods 匹配receiver的所有methods中与matchFn签名参数类似的方法
Types ¶
type Utils ¶
type Utils interface {
GetFuncName(fn any) string //从函数实例获取函数名
GetStructName(obj any) string // 从实例获取结构名
GetVarName(v any) string // 获取变量名
StructSet(obj any, nilField any, val any) error // 给结构体设置field类型的值
MatchReceiverMethods(receiver any, matchFn any) map[string]any // 匹配receiver的所有methods中与matchFn签名参数类似的方法
GetFuncSignature(fn any) string // 获取函数签名信息
InspectValue(v any) Value // 检索Value的信息
FuncEqual(fn1, fn2 any) bool // 函数是否相等
}
type Value ¶
func InspectValue ¶
Click to show internal directories.
Click to hide internal directories.