mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-11 23:08:34 +08:00
@@ -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))
|
||||
}
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user