Skip to content

Commit f24d71b

Browse files
authored
Fix a small zh typo
1 parent bc78f2c commit f24d71b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

zh/02.5.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ func main() {
238238

239239
也许细心的读者会问这样的问题,PaintItBlack里面调用SetColor的时候是不是应该写成`(&bl[i]).SetColor(BLACK)`,因为SetColor的receiver是*Box,而不是Box。
240240

241-
你又说对的,这两种方式都可以,因为Go知道receiver是指针,他自动帮你转了。
241+
你又说对了,这两种方式都可以,因为Go知道receiver是指针,他自动帮你转了。
242242

243243
也就是说:
244244
>如果一个method的receiver是*T,你可以在一个T类型的实例变量V上面调用这个method,而不需要&V去调用这个method

0 commit comments

Comments
 (0)