Skip to content

Instantly share code, notes, and snippets.

@kitschysynq
Last active June 14, 2021 13:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kitschysynq/8b9a8223ef641d3c62e16a7379e344c2 to your computer and use it in GitHub Desktop.
Save kitschysynq/8b9a8223ef641d3c62e16a7379e344c2 to your computer and use it in GitHub Desktop.
Introductory resources for learning Go

Resources for learning Go

Below are resources that I consistently recommend for new folks learning Go. In general, I usually find myself recommending them in this order:

  1. A Tour of Go
  2. Effective Go
  3. Go by Example
  4. Learn Go with tests

and then using other resources as reference material as needed. In particular, A Tour of Go and Effective Go set a good foundation even for experienced developers.

Official Go Documentation

The official Go documentation does a fantasic job of introducing the language. There's so much good information here, that I find myself returning to it occasionally to refresh.

A few items from the official docs might be of particular interest for someone just getting started:

A Tour of Go

https://tour.golang.org/welcome/1

This resource walks through all of the essential parts of the language, and includes a playground on every page to try out the concept being explained.

Effective Go

https://golang.org/doc/effective_go.html

Effective Go isn't a tutorial but rather covers many Go standard practices. Nothing (or maybe very little?) described here is required for writing Go but following these guidelines will make your code easier to read for folks who are already familiar with the Go ecosystem, and in many cases will make your code easier to write and to test.

Package Documentation

https://golang.org/pkg/

The Go standard library covers a lot of ground, and if you're familiar with the many things it offers, you'll probably find that you can accomplish a lot of things without having to reach beyond it. In addition to the APIs that it presents, the official package documentation links to the source for a lot of what's available, and the source itself is great reading for implementation approaches and styles.

Go by Example

https://gobyexample.com/

From description at the beginning of the page:

Go by Example is a hands-on introduction to Go using annotated example programs.

Learn Go with tests

https://quii.gitbook.io/learn-go-with-tests/

This gitbook covers several practical aspects of writing Go with a focus on TDD style. The testing tools combined with idiomatic code are (imo) one of the great things about Go, and this book is a great resource for getting familiar with both of those aspects of the language.

Go Proverbs

https://go-proverbs.github.io/

According to Google (and Oxford Languages), a proverb is "a short pithy saying in general use, stating a general truth or piece of advice". These Go Proverbs are not rules to be followed but are often good advice, and even when they don't apply to your particular situation will frequently provide something worth considering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment