fix: fix a lot of incorrect links (#849)

This commit is contained in:
Rethan
2022-06-25 18:18:09 +08:00
committed by GitHub
parent 8f1ca5772e
commit 7a54d34d36
28 changed files with 69 additions and 69 deletions

View File

@@ -105,7 +105,7 @@ func main() {
any hello is a special String!
**练习 11.9** [simple_interface3.go](exercises\chapter_11\simple_interface3.go)
**练习 11.9** [simple_interface3.go](exercises/chapter_11/simple_interface3.go)
继续练习 11.2,在它中添加一个 `gI()` 函数,它不再接受 `Simpler` 类型的参数,而是接受一个空接口参数。然后通过类型断言判断参数是否是 `Simpler` 类型。最后在 `main` 使用 `gI()` 取代 `fI()` 函数并调用它。确保你的代码足够安全。
@@ -141,7 +141,7 @@ func (p *Vector) Set(i int, e Element) {
`Vector` 中存储的所有元素都是 `Element` 类型要得到它们的原始类型unboxing拆箱需要用到类型断言。TODOThe compiler rejects assertions guaranteed to fail类型断言总是在运行时才执行因此它会产生运行时错误。
**练习 11.10** [min_interface.go](exercises\chapter_11\min_interface.go) / [minmain.go](exercises\chapter_11\minmain.go)
**练习 11.10** [min_interface.go](exercises/chapter_11/min_interface.go) / [minmain.go](exercises/chapter_11/minmain.go)
仿照 11.7 中开发的 `Sorter` 接口,创建一个 `Miner` 接口并实现一些必要的操作。函数 `Min()` 接受一个 `Miner` 类型变量的集合,然后计算并返回集合中最小的元素。