diff --git a/gee-rpc/doc/geerpc-day3.md b/gee-rpc/doc/geerpc-day3.md index 912ea14..c1b720c 100644 --- a/gee-rpc/doc/geerpc-day3.md +++ b/gee-rpc/doc/geerpc-day3.md @@ -80,8 +80,8 @@ func main() { for i := 0; i < typ.NumMethod(); i++ { method := typ.Method(i) argv := make([]string, 0, method.Type.NumIn()) - returns := make([]string, 0, method.Type.NumIn()) - // j 从 1 开始,第 0 个入参是 wg 自己。 + returns := make([]string, 0, method.Type.NumOut()) + // j 从 1 开始,第 0 个入参是 wg 自己。 for j := 1; j < method.Type.NumIn(); j++ { argv = append(argv, method.Type.In(j).Name()) } @@ -494,4 +494,4 @@ start rpc server on [::]:57509 ## 附 推荐阅读 - [Go 语言简明教程](https://geektutu.com/post/quick-golang.html) -- [Go 语言笔试面试题](https://geektutu.com/post/qa-golang.html) \ No newline at end of file +- [Go 语言笔试面试题](https://geektutu.com/post/qa-golang.html)