Read the license before use the library: <a href="https://github.com/bouk/monkey/blob/master/LICENSE.md" rel="nofollow">https://github.com/bouk/monkey/blob/master/LICENSE.md</a>
Caution! This approach is very dangerous, and not thread safe.
Cool to see these system level programming tricks being done in Go.<p>This kind of dirty tricks is sometimes used to mock binary libraries for testing.<p><a href="https://www.microsoft.com/en-us/research/project/detours/" rel="nofollow">https://www.microsoft.com/en-us/research/project/detours/</a><p><a href="https://docs.microsoft.com/en-us/visualstudio/test/isolating-code-under-test-with-microsoft-fakes?view=vs-2019" rel="nofollow">https://docs.microsoft.com/en-us/visualstudio/test/isolating...</a><p>Yep, questionable, but sometimes that is the only way to match those QA metrics.
Hah reminds me of the spirit of fuckitjs (<a href="https://github.com/mattdiamond/fuckitjs" rel="nofollow">https://github.com/mattdiamond/fuckitjs</a>).
This is from 2015 (though I didn't see it that time round so thanks for the resubmission).<p>Previous discussion: <a href="https://news.ycombinator.com/item?id=9290917" rel="nofollow">https://news.ycombinator.com/item?id=9290917</a>