소스 검색

fix 10.6.9 wrong

cannot use i (type *Integer) as type int in argument to strconv.Itoa
Ding 9 년 전
부모
커밋
14ce0489c8
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      eBook/10.6.md

+ 1 - 1
eBook/10.6.md

@@ -648,7 +648,7 @@ Go 不需要一个显式的类定义,如同 Java、C++、C# 等那样,相反
 ```go
 type Integer int
 func (i *Integer) String() string {
-    return strconv.Itoa(i)
+    return strconv.Itoa(int(*i))
 }
 ```