CreateFuncForCodePtr accepts a code pointer and creates a function
value that uses the pointer. The outFuncPtr argument should be a pointer
to a function of the proper type (e.g. the address of a local variable),
and will be set to the result function value.
FindFuncWithName searches through the moduledata table created by the
linker and returns the function's code pointer.
If the function does not exist, or is inlined, or inactive (haven't been
compiled into the binary), it panics.
GetFunc gets the function defined by the given fully-qualified name.
The outFuncPtr parameter should be a pointer to a function with the
appropriate type (e.g. the address of a local variable), and is set to
a new function value that calls the specified function.
If the function does not exist, or is inlined, or inactive (haven't been
compiled into the binary), it panics.
GetType gets the type defined by the given fully-qualified name.
If the specified type does not exist, or inactive (haven't been
compiled into the binary), it panics.
type Func struct {
// contains filtered or unexported fields
}
Func is a convenience struct for modifying the underlying code pointer
of a function value. The actual struct has other values, but always
starts with a code pointer.