# Go 零基础编程入门教程

制作、分享高质量 Go 入门教程，包括[视频](https://space.bilibili.com/276273794/#/)、[电子书](https://www.gitbook.com/book/songjiayang/go-basic-courses/details)、[源代码](https://github.com/binatify/importgo)，如果你对本书感兴趣，欢迎 star。

## 作者信息

* 宋佳洋，GitHub [songjiayang](https://github.com/songjiayang)
* 薛锦，GitHub [csxuejin](https://github.com/csxuejin)

## 目录

* [Go 零基础编程入门教程](/go-basic-courses/master.md)
* [Go 安装和配置](/go-basic-courses/ch1.md)
* [Go 开发利器：VSCode](/go-basic-courses/ch2.md)
* [基础知识](/go-basic-courses/ch3.md)
  * [命名规范](/go-basic-courses/ch3/identifiers.md)
  * [变量](/go-basic-courses/ch3/var.md)
  * [常量](/go-basic-courses/ch3/const.md)
* [基础数据类型](/go-basic-courses/ch4.md)
* [高级类型](/go-basic-courses/ch5.md)
  * [数组](/go-basic-courses/ch5/array.md)
  * [切片](/go-basic-courses/ch5/slice.md)
  * [Map](/go-basic-courses/ch5/map.md)
  * [自定义类型](/go-basic-courses/ch5/custom.md)
  * [结构体](/go-basic-courses/ch5/struct.md)
  * [函数](/go-basic-courses/ch5/function.md)
  * [方法](/go-basic-courses/ch5/method.md)
  * [接口](/go-basic-courses/ch5/interface.md)
* [流程控制](/go-basic-courses/ch6.md)
  * [分支循环](/go-basic-courses/ch6/control.md)
  * [异常处理](/go-basic-courses/ch6/error.md)
* [并发](/go-basic-courses/ch7.md)
  * [Go 协程](/go-basic-courses/ch7/goroutine.md)
  * [Channel](/go-basic-courses/ch7/channel.md)
  * [锁的使用](/go-basic-courses/ch7/lock.md)
  * [原子操作](/go-basic-courses/ch7/atomic.md)
* [文件操作](/go-basic-courses/ch8.md)
  * [读文件](/go-basic-courses/ch8/readfile.md)
  * [写文件](/go-basic-courses/ch8/writefile.md)
* [序列化和反序列化](broken://pages/-MDeAlfjL_V6cOe4BXbf)
  * [XML](/go-basic-courses/ch9/xml.md)
  * [JSON](/go-basic-courses/ch9/json.md)
* [网络](broken://pages/-MDeAlfm6GJzSW0-UfKa)
  * [TCP](/go-basic-courses/ch10/tcp.md)
  * [UDP](/go-basic-courses/ch10/udp.md)
  * [HTTP](/go-basic-courses/ch10/http.md)
* [数据库操作](broken://pages/-MDeAlfqXuSajjoGuquk)
  * [MySQL](broken://pages/-MDeAlfrjaw9LIdkjfWg)
  * [MongoDB](broken://pages/-MDeAlfsxAEcdD3tlAFg)
* [项目工程](/go-basic-courses/ch12.md)
  * [包和管理](broken://pages/-MDeAlfu8QyijvniMzDB)
  * [单元测试](broken://pages/-MDeAlfv4IhPh_KdhsOh)
  * [日志工具](https://github.com/songjiayang/go-basic-courses/tree/17936e413162eb13a10d5e7c8b594f88a5fe8f47/ch12/logging.md)
  * [命令行参数](https://github.com/songjiayang/go-basic-courses/tree/17936e413162eb13a10d5e7c8b594f88a5fe8f47/ch12/flag.md)
  * [编译部署](https://github.com/songjiayang/go-basic-courses/tree/17936e413162eb13a10d5e7c8b594f88a5fe8f47/ch12/compile.md)

## 版权

宋佳洋、薛锦，保留相关权利。为了保护读者的权益，我们和出版社沟通为读者争取到以下权利： 1. Github平台免费在线阅读。 2. 关注本书项目(Star)，同时关注任意一个作者的 Github 或推特账号，自动获得下载的权利。

**禁止非 Github 平台转载，作者保留相关法律权利**。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://song-jia-yang.gitbook.io/go-basic-courses/master.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
