fix 10.6.9 wrong

cannot use i (type *Integer) as type int in argument to strconv.Itoa
This commit is contained in:
Ding
2016-12-24 23:07:56 +08:00
committed by GitHub
parent e6124ce092
commit 14ce0489c8

View File

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