Registry / testing / cch123-supermonkey

cch123-supermonkey

JSON →
library1.0.1gogounverified

A Go monkey patching library for replacing functions at runtime.

go get github.com/cch123/supermonkey
INSTALL
IMPORT
SIG · CCH123-SUPERMONKEY
C
cch123-supermonkey
testinggov1.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

supermonkey
github.com/cch123/supermonkey

Patch a function and restore it later.

package main import ( "fmt" "github.com/cch123/supermonkey" ) func original() string { return "original" } func main() { patch := supermonkey.Patch(original, func() string { return "patched" }) defer patch.Unpatch() fmt.Println(original()) }
Debug
Known issues
gotchaSupermonkey may not work on all platforms or Go versions due to runtime constraints.
fix
Test thoroughly on your target platform and Go version.
affects: all
Upgrade
Version history
1.0.1latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
10
Amazon
1
OpenAI (training)
1
Resources
cch123-supermonkey — go get cch123-supermonkey · libregistry