> For the complete documentation index, see [llms.txt](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wskdsgcf.gitbook.io/mastering-go-zh-cn/05.0/05.8.md).

# 05.8 Go 语言中的栈

**栈**是一种看起来像一堆盘子的数据结构。你在需要一个新盘子时会先使用最后一个被放在这堆盘子顶端的那个盘子。

栈最大的优点就是简单，因为你只需要实现两个函数就能使用栈，之后你可以向栈中添加新节点或者删除栈中的节点。
