We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
func methodA(){
... go methodB() .... }
gomonkey.ApplyFunctionReturn(methodB) linux环境下,不生效
The text was updated successfully, but these errors were encountered:
我也遇到这个问题. 环境: win11, amd64, go1.22, gomonkey v2.11.0 type A struct { ants.Pool} func(a *A)methodA(){ s.Pool.Submit(func(){ a.methodB() }) } func(a *A)methodB(){} 在测试时,发现applyPrivateMethod无法生效, 不过applyMethod是生效的。 对于gomonkey的原理完全不了解, 是否可以帮忙看看呢。
我也遇到这个问题. 环境: win11, amd64, go1.22, gomonkey v2.11.0
type A struct { ants.Pool} func(a *A)methodA(){ s.Pool.Submit(func(){ a.methodB() }) } func(a *A)methodB(){}
在测试时,发现applyPrivateMethod无法生效, 不过applyMethod是生效的。 对于gomonkey的原理完全不了解, 是否可以帮忙看看呢。
Sorry, something went wrong.
我也遇到这个问题. 环境: win11, amd64, go1.22 type A struct { ants.Pool} func(a *A)methodA(){ s.Pool.Submit(func(){ a.methodB() }) } func(a *A)methodB(){} 在测试时,发现applyPrivateMethod无法生效。 对于gomonkey的原理完全不了解, 是否可以帮忙看看呢。
我也遇到这个问题. 环境: win11, amd64, go1.22
在测试时,发现applyPrivateMethod无法生效。 对于gomonkey的原理完全不了解, 是否可以帮忙看看呢。
Gomonkey的mock并发不安全,可以尝试一下xgo,对比可以参考这里:#157 (comment)
我也遇到这个问题. 环境: win11, amd64, go1.22 type A struct { ants.Pool} func(a *A)methodA(){ s.Pool.Submit(func(){ a.methodB() }) } func(a *A)methodB(){} 在测试时,发现applyPrivateMethod无法生效。 对于gomonkey的原理完全不了解, 是否可以帮忙看看呢。 Gomonkey的mock并发不安全,可以尝试一下xgo,对比可以参考这里:#157 (comment)
有时间瞅瞅,不过测试的过程中没有并发的情况,gomonkey也不支持
No branches or pull requests
func methodA(){
...
go methodB()
....
}
gomonkey.ApplyFunctionReturn(methodB) linux环境下,不生效
The text was updated successfully, but these errors were encountered: