Skip to content

Commit

Permalink
Merge pull request #60 from bytedance/feat/faq_go123
Browse files Browse the repository at this point in the history
add more faq for go 1.23
  • Loading branch information
Sychorius authored Aug 15, 2024
2 parents a60edcc + 19e6db8 commit 567d66f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
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

0 comments on commit 567d66f

Please sign in to comment.