reflect

package
v1.11.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallErrorHook

func CallErrorHook(hooks interface{}, hookName string, ctx interface{}) error

CallErrorHook Call function returning an error: func hooks.hookName(ctx) error {} Tested and working

func CallHook

func CallHook(hooks interface{}, hookName string, ctx interface{})

CallHook Call function: func hooks.hookName(ctx) {} Panic error at runtime, surely due to the removal of returned error (Works in CallErrorHook)

func GetMethodValue

func GetMethodValue(ptrOnStruct interface{}, methodName string) (reflect.Value, error)

GetMethodValue Get the reflect.Value of a method if found in the struct pointed by the pointer passed as argument

func IsMethodPureInterface

func IsMethodPureInterface(ptrOnStruct interface{}, methodName string) bool

IsMethodPureInterface Checks that the method to call is not a pure interface (vs. an interface implemented in a struct) Else, display a generic message and continue without error

Types

This section is empty.

Jump to

Keyboard shortcuts

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