We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc78f2c commit f24d71bCopy full SHA for f24d71b
zh/02.5.md
@@ -238,7 +238,7 @@ func main() {
238
239
也许细心的读者会问这样的问题,PaintItBlack里面调用SetColor的时候是不是应该写成`(&bl[i]).SetColor(BLACK)`,因为SetColor的receiver是*Box,而不是Box。
240
241
-你又说对的,这两种方式都可以,因为Go知道receiver是指针,他自动帮你转了。
+你又说对了,这两种方式都可以,因为Go知道receiver是指针,他自动帮你转了。
242
243
也就是说:
244
>如果一个method的receiver是*T,你可以在一个T类型的实例变量V上面调用这个method,而不需要&V去调用这个method
0 commit comments