Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add more faq for go 1.23 #60

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,15 @@ func TestMockXXX(t *testing.T) {
### Version Support
- Go 1.13+


## License
Mockey is distributed under the [Apache License](https://github.com/bytedance/mockey/blob/main/LICENSE-APACHE), version 2.0. The licenses of third party dependencies of Mockey are explained [here](https://github.com/bytedance/mockey/blob/main/licenses).

## FAQ

### Go 1.23 compile error `"link: github.com/bytedance/mockey/internal/monkey/common: invalid reference to runtime.sysAllocOS"`?
add build flag `-ldflags=-checklinkname=0`

### How to disable inline and compile optimization?
1. Command line:`go test -gcflags="all=-l -N" -v ./...`
2. Goland:fill `-gcflags="all=-l -N"` in the **Run/Debug Configurations > Go tool arguments** dialog box
Expand Down
3 changes: 3 additions & 0 deletions README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ Mockey 基于[Apache License 2.0](https://github.com/bytedance/mockey/blob/main/

## FAQ

### Go 1.23 编译错误 `"link: github.com/bytedance/mockey/internal/monkey/common: invalid reference to runtime.sysAllocOS"`?
增加编译参数 `-ldflags=-checklinkname=0`

### 如何禁用内联和编译优化?
1. 命令行:`go test -gcflags="all=-l -N" -v ./...`
2. Goland:在 **运行/调试配置 > Go工具实参** 对话框中填写 `-gcflags="all=-l -N"`
Expand Down
Loading