advanced-go-programming-book icon indicating copy to clipboard operation
advanced-go-programming-book copied to clipboard

:books: 《Go语言高级编程》开源图书,涵盖CGO、Go汇编语言、RPC实现、Protobuf插件实现、Web框架实现、分布式系统等高阶主题(完稿)

Results 70 advanced-go-programming-book issues
Sort by recently updated
recently updated
newest added

# Description of problem 问题点: - 第 3 章 汇编语言 - 3.6.1 函数调用规范 - 图 3-13 函数调用参数布局 # Expected result “图 3-13 函数调用参数布局 ” 的最后一个位置,应当是 callee’s BP ``` callee's BP...

bug

**第四章 RPC和Protobuf**里的`链接`修改为`连接`

我发现只需要在pkg.go 文件里面加入`var NameData [8]byte`就可以了,而不需要其他的修改,具体修改如下: ``` package pkg + var NameData [8]byte var Name string ``` https://github.com/chai2010/advanced-go-programming-book/blob/master/ch3-asm/ch3-01-basic.md

欢迎大家提供帮助

help wanted

```go func LoopAdd(cnt, v0, step int) int { result := v0 for i := 0; i < cnt; i++ { result += step } return result } ``` > 比如...

bug

```go func GetGoid() int64 { g := getg() gid := reflect.ValueOf(g).FieldByName("goid").Int() return goid } ``` `return goid` => `return gid`

勘误1-1

### 附录A 里边提到的"独占CPU导致其它Goroutine饿死"问题, 在[Go 1.14](https://go.dev/doc/go1.14#runtime)中已经基本得到解决. **应该补充说明**. > Goroutines are now asynchronously preemptible. As a result, loops without function calls no longer potentially deadlock the scheduler or significantly delay garbage collection....

提示:哪一章节的问题,建议如何修改 #### go 编译器版本 ```bash go1.18 ``` #### go命令选项 ```go go tool compile -l -N -S add.go ``` 在阅读汇编那节内容. 做了个实验, 发现函数里面的参数从寄存器里面拿就可以了. 当然我的汇编比较菜, 也有可能是看错了. ```go func AddNine(a int, b int, c...