Go functions can be redefined at runtime by manipulating memory directly, despite lacking language-level support for monkey patching. The technique involves using reflection to get function addresses, modifying memory page permissions with mprotect, and writing JMP instructions to redirect execution. The article provides

8m read timeFrom pboyd.io
Post cover image
Table of contents
The problems
1 Comment

Sort: