Skip to content

Databases ​

Guides for working with mainstream databases from Go, including connection setup, common operations and code samples.

  • ElasticSearch — full-text search and aggregations
  • MongoDB — reading and writing documents
  • MySQL — relational data with database/sql
  • Redis — caching and key-value operations

If you are connecting to a database from Go for the first time, start with the MySQL chapter — its connection pool and context usage patterns apply to the other drivers as well.

Golang by www.golangdev.cn · Adapted in part from Golang 中文学习文档 (MIT, © 寒江蓑笠翁)