I read the code, finding that it actually copy the executable file and modify it to instrument. As the author have stated, it has pros and cons.
Now, the same idea, replacing on the fly, inspired another project that also implements mocking. That is the xgo progject: https://github.com/xhd2015/xgo.
The difference is, xgo replaces source file instead of binary file. So it is totally a native go solution.
I read the code, finding that it actually copy the executable file and modify it to instrument. As the author have stated, it has pros and cons.
Now, the same idea, replacing on the fly, inspired another project that also implements mocking. That is the xgo progject: https://github.com/xhd2015/xgo.
The difference is, xgo replaces source file instead of binary file. So it is totally a native go solution.
Maybe we can discuss more here.