Closed kakisong closed 4 years ago
func A() { fmt.Println("real function") }
func TestA(t *testing.T) { gomonkey.ApplyFunc(A, func() { fmt.Println("mock function") }) A() }
when run this test case, it print real function when debug this test case, it print mock function
我也遇到了这个问题, 所以是啥原因啊?或者说该怎么生效呢?
@kakisong 我也遇到这个问题,请问你是怎么解决的
when run this test case, it print real function when debug this test case, it print mock function