reflectutils

package
v0.0.0-...-53a60af Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallMethodByInterface

func CallMethodByInterface[M, B any](o B, args ...interface{}) []interface{}

func CallMethodByInterfaceVA

func CallMethodByInterfaceVA[M, B any](o B, a interface{})

CallMethodByInterfaceVA calls a void method on object o with one argument a. The method is specified by the interface M, which should implement exactly one appropriate method.

func CallMethodByName

func CallMethodByName[B any](n string, o B, args ...interface{}) []interface{}

func CallMethodByNameVA

func CallMethodByNameVA[B any](n string, o B, a interface{})

func GetInterfaceMethod

func GetInterfaceMethod[M any]() reflect.Method

GetInterfaceMethod gets the method of an interface with one method.

func MapValueToInterface

func MapValueToInterface(v reflect.Value) interface{}

func UnexportedFieldByIndex

func UnexportedFieldByIndex(p any, n int) reflect.Value

func UnexportedFieldByName

func UnexportedFieldByName(p any, name string) reflect.Value

Types

This section is empty.

Jump to

Keyboard shortcuts

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