Merge pull request #12 from hacknode/patch-5

Update ch7-03.md
This commit is contained in:
曹春晖 2016-11-22 15:36:49 +08:00 committed by GitHub
commit 3cd7b5557d

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