agiledragon / agiledragon/gomonkey
ApplyFuncVar和ApplyFunc有什么区别?
未关闭
- 主要语言
- Go
- 星标
- 2.3k
- 派生
- 192
- 平均合并
- 1 天 6 小时
- 30 天内合并 PR
- 1
描述
Convey("for succ", func() {
str := "hello"
patches := ApplyFuncVar(&fake.Marshal, func (_ interface{}) ([]byte, error) {
return []byte(str), nil
})
defer patches.Reset()
bytes, err := fake.Marshal(nil)
So(err, ShouldEqual, nil)
So(string(bytes), ShouldEqual, str)
})
ApplyFuncVar替换为ApplyFunc不也是同样的效果?
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。