Skip to content

Commit 8e70671

Browse files
authored
method.Type.NumIn() => method.Type.NumOut()
1 parent d632550 commit 8e70671

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

gee-rpc/doc/geerpc-day3.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ func main() {
8080
for i := 0; i < typ.NumMethod(); i++ {
8181
method := typ.Method(i)
8282
argv := make([]string, 0, method.Type.NumIn())
83-
returns := make([]string, 0, method.Type.NumIn())
84-
// j 从 1 开始,第 0 个入参是 wg 自己。
83+
returns := make([]string, 0, method.Type.NumOut())
84+
// j 从 1 开始,第 0 个入参是 wg 自己。
8585
for j := 1; j < method.Type.NumIn(); j++ {
8686
argv = append(argv, method.Type.In(j).Name())
8787
}
@@ -494,4 +494,4 @@ start rpc server on [::]:57509
494494
## 附 推荐阅读
495495

496496
- [Go 语言简明教程](https://geektutu.com/post/quick-golang.html)
497-
- [Go 语言笔试面试题](https://geektutu.com/post/qa-golang.html)
497+
- [Go 语言笔试面试题](https://geektutu.com/post/qa-golang.html)

0 commit comments

Comments
 (0)