Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyToLocation ¶
this function is super unsafe aww yeah It copies a slice to a raw memory location, disabling all memory protection before doing so.
func JmpToFunctionValue ¶
Assembles a jump to a function value
func ReplaceFunction ¶
from is a pointer to the actual function to is a pointer to a go funcvalue
Types ¶
type PatchGuard ¶
type PatchGuard struct {
// contains filtered or unexported fields
}
func Patch ¶
func Patch(target, replacement interface{}) *PatchGuard
Patch replaces a function with another
func PatchInstanceMethod ¶
func PatchInstanceMethod(target reflect.Type, methodName string, replacement interface{}) *PatchGuard
PatchInstanceMethod replaces an instance method methodName for the type target with replacement Replacement should expect the receiver (of type target) as the first argument
func PatchSymbol ¶
func PatchSymbol(target, replacement interface{}) *PatchGuard
func (*PatchGuard) Restore ¶
func (g *PatchGuard) Restore()
func (*PatchGuard) Unpatch ¶
func (g *PatchGuard) Unpatch()
Click to show internal directories.
Click to hide internal directories.