gomonkey不生效
摘要:
gomonkey作用在运行时把原函数地址替换为目标函数地址。Mock接口时使用实现接口的结构体。 go.mod require github.com/agiledragon/gomonkey/v2 v2.3.0 a.go package main type A struct {} func (a A 阅读全文
posted @ 2023-02-04 20:50 王景迁 阅读(1815) 评论(0) 推荐(1)
posted @ 2023-02-04 20:50 王景迁 阅读(1815) 评论(0) 推荐(1)