撸了个 Go 的“代理类”生成器,自动分析 struct 、interface 的所有方法(支持嵌套结构),生成一个 proxy struct,可以通过这个 proxy struct 拦截各种方法调用,修改调用参数、返回值等,需要自取 => https://github.com/roy2220/proxyz
1
wfhtqp Jun 17, 2020
画蛇添足
|
2
cc100 Jun 17, 2020
这个代理是为了解决什么问题呢
|
4
saber000 Jun 21, 2020
可以给单元测试提供 spy 的机制吧
|