go-kiss / monkey

Go语言猴子补丁框架
https://taoshu.in/go/monkey/
MIT License
119 stars 18 forks source link

docs: update README to clarify the instruction to disable inline #4

Closed x1nchen closed 2 years ago

x1nchen commented 2 years ago

是的,不好意思我描述的有歧义

taoso @.***>于2022年3月10日 周四18:57写道:

@.**** commented on this pull request.

In README.md https://github.com/go-kiss/monkey/pull/4#discussion_r823597533:

@@ -47,7 +47,7 @@ func main() {

注意事项

-1. Monkey 需要关闭 Go 语言的内联优化才能生效,比如测试的时候需要:go test -gcflags=-l

+1. Monkey 需要关闭 Go 语言的内联优化才能生效,比如测试的时候需要:go test -gcflags=-l。(go 1.17 编译参数使用 -gcflags=all=-l)

这里是不是可以直接改成go test -gcflags=all=-l? 我看文档的意思是如果不加all,gcflags 只能在当前 package 生效。

— Reply to this email directly, view it on GitHub https://github.com/go-kiss/monkey/pull/4#pullrequestreview-905661291, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALV52WBEFGBF3DW7PY7IZL3U7HISXANCNFSM5QMD5MGQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

x1nchen commented 2 years ago

重新提交了。

在给具有一定规模的项目写测试的时候,patch 别的包的方法还是很常见的。