From 7b1805eada38c9d6cb04dde305d7d8855ff45560 Mon Sep 17 00:00:00 2001 From: Sarlor Date: Sat, 19 May 2018 05:37:22 +0800 Subject: [PATCH] Update 11.6.md (#469) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改一些问题 --- eBook/11.6.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eBook/11.6.md b/eBook/11.6.md index bbac375..380e2aa 100644 --- a/eBook/11.6.md +++ b/eBook/11.6.md @@ -62,7 +62,7 @@ func main() { **讨论** -在 `lst` 上调用 `CountInto` 时会导致一个编译器错误,因为 `CountInto` 需要一个 `Appender`,而它的方法 `Append` 只定义在指针上。 在 `lst` 上调用 `LongEnough` 是可以的因为 'Len' 定义在值上。 +在 `lst` 上调用 `CountInto` 时会导致一个编译器错误,因为 `CountInto` 需要一个 `Appender`,而它的方法 `Append` 只定义在指针上。 在 `lst` 上调用 `LongEnough` 是可以的,因为 `Len` 定义在值上。 在 `plst` 上调用 `CountInto` 是可以的,因为 `CountInto` 需要一个 `Appender`,并且它的方法 `Append` 定义在指针上。 在 `plst` 上调用 `LongEnough` 也是可以的,因为指针会被自动解引用。 @@ -89,4 +89,4 @@ Go 语言规范定义了接口方法集的调用规则: - [目录](directory.md) - 上一节:[测试一个值是否实现了某个接口](11.5.md) -- 下一节:[第一个例子:使用 Sorter 接口排序](11.7.md) \ No newline at end of file +- 下一节:[第一个例子:使用 Sorter 接口排序](11.7.md)