-
Current tests use gomonkey to setup and clear patches, which is not concurrent safe and does not always run well.
Here comes the new options: https://github.com/xhd2015/xgo.
If you like, I will …
-
Since we are helping open projects migrating from gomonkey to xgo, see https://github.com/xhd2015/xgo/issues/18.
We need to draft a migration document.
-
Hello guys, I'm here planning to rewrite some unit tests in the project, switching from gomonkey to xgo.
Xgo is a more go-native mocking library and provides simpler API and smoother user experienc…
-
Example
```golang
gomonkey.ApplyFunc(NewClient, func() *Client {
// The original NewClient will be used here, but it has been actually replaced
return NewClient()
})
```
Calling New…
-
Since gomonkey and mockery both aim to provide mock for go, each in different ways. And their method should be considered outdated as xgo has evovled.
Thus, I propose we find active projects(has co…
-
https://majunmin.github.io/post/Go-Test-Gomonkey%E4%BD%BF%E7%94%A8.html
golang的单测, 有一些约定, 例如文件名是 xxx.go, 测试文件名必须是 xxx_test.go, 且测试函数的方法名 都是以 Test开头, 使用go test 命令, 有时发现mock不住,一般都是内联(简短)函数mock失败,可以执…
-
## Who is using gomonkey?
Thanks sincerely for constantly using and supporting gomonkey, I will try my best to make gomonkey better, and keep growing gomonkey community. To attract more developers t…
-
**What feature you'd like to add:**
ENV: Apple M1
While running below code,
```
make test
```
will meet errors as below
```
....
# github.com/agiledragon/gomonkey
../../../../pkg/mod/gith…
-
I used it om arm platform,and it failed with such error: "../../../../pkg/mod/github.com/agiledragon/gomonkey@v2.0.1+incompatible/patch.go:160:10: undefined: buildJmpDirective",but it runs ok on x86 p…
-
Currently, all tests will fail with the following log:
```
# bou.ke/monkey
Error: ../../../go/pkg/mod/bou.ke/monkey@v1.0.2/replace.go:24:14: undefined: jmpToFunctionValue
```
This seems to be…