修补所有Go功能以进行测试-Golang开发

时间:2021-05-26 18:49:21
【文件属性】:
文件名称:修补所有Go功能以进行测试-Golang开发
文件大小:75KB
文件格式:ZIP
更新时间:2021-05-26 18:49:21
Golang Testing 修补所有用于测试SuperMonkey的Go函数此库受https://github.com/bouk/monkey的启发,并使用一些代码简介修补所有无限制的函数,包括未导出的警告:请在您的gcflags中添加-l或将// go:noinline添加到要修补的func中。 修补程序私有函数正常包主要导入(“ fmt” sm“ github.com/cch123/supermonkey”)func main(){fmt.Println(“原始函数输出:”)heyHey()//伪造的fmt.Println()sm .patch(“ main”,“”,“ heyHey”,
【文件预览】:
supermonkey-master
----examples()
--------main.go(160B)
--------patch_func_symbol.go(464B)
--------patch_instance_func_symbol.go(509B)
--------patch_instance_func.go(534B)
--------patch_func.go(420B)
--------patch_struct_method_symbol.go(644B)
--------patch_struct_method.go(647B)
----LICENSE(1KB)
----go.mod(155B)
----supermonkey.go(2KB)
----readme.md(4KB)
----supermonkey_test.go(779B)
----internal()
--------xcoff()
--------goobj()
--------bouk()
--------objabi()
--------nm()
--------src()
--------objfile()
--------sys()
----go.sum(282B)

网友评论