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 time• From pboyd.io
1 Comment
Sort: