Update ch7-03.md

This commit is contained in:
hacknode 2016-11-22 15:21:34 +08:00 committed by GitHub
parent 5c649d8c65
commit f4a21a2269

View File

@ -41,7 +41,7 @@ var s IntSet
var _ = s.String() // OK: s is a variable and &s has a String method var _ = s.String() // OK: s is a variable and &s has a String method
``` ```
然而,由于只有`*IntSet`类型有String方法也只有`*IntSet`类型实现了fmt.Stringer接口 然而,由于只有`*IntSet`类型有String方法也只有`*IntSet`类型实现了fmt.Stringer接口
```go ```go
var _ fmt.Stringer = &s // OK var _ fmt.Stringer = &s // OK