Files
the-way-to-go_ZH_CN/eBook/19.1.md
marjune 1dfd41bd93 add chapter 19.x (#700)
* add chapter 19.x

* add chapter 19.4
2019-08-01 21:16:46 -07:00

22 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 19.1 简介
由于 web 无处不在,本章我们将开发一个完整的程序:`goto`,它是一个 web 缩短网址应用程序。示例来自 Andrew Gerrand 的讲座(见参考资料 22。我们将把项目分成 3 个阶段,每一个都会比之前阶段包含更多的功能,并逐渐展示更多 Go 语言中的特性。我们会大量使用在 [15章](15.0.md) 所学的网页应用程序的知识。
**版本 1** 利用映射和结构体,与 `sync` 包的 `Mutex` 一起使用,以及一个结构体工厂。
**版本 2** 数据以 `gob` 格式写入文件以实现持久化。
**版本 3** 利用协程和通道重写应用(见 [14章](14.0.md))。
**版本 4** 如果我们要使用 json 格式的文件该如何修改?
**版本 5** 用 rpc 协议实现的分布式版本。
由于代码变更频繁,不会展示在此处,仅给出访问地址。
## 链接
- [目录](directory.md)
- 上一节:[构建一个完整的应用程序](19.0.md)
- 下一节:[短网址项目简介](19.2.md)