gomonkey is a library to make monkey patching in unit tests easy
gomonkey is a library to make monkey patching in unit tests easy
gomonkey is a library to make monkey patching in unit tests easy, and the core idea of monkey patching comes from Bouke, you can read this blogpost for an explanation on how it works.
-gcflags=-l(below go1.10) or -gcflags=all=-l(go1.10 and above).ARCH
OS
$ go get github.com/agiledragon/gomonkey@v2.0.2$ go get github.com/agiledragon/gomonkey/v2@v2.11.0$ go test . ./test -gcflags=all=-lPlease refer to the test cases as idioms, very complete and detailed.
No open issues yet, or sync has not completed.