Skip to content

Wrapping up the Go series: recap and where to learn next

This is the last chapter of the series. It recaps what the earlier chapters covered and points to the resources worth using next.

  1. Variables and types. Go is statically typed, with built-in integer, floating-point, boolean and string types, and type inference via :=. Conversions between types are always explicit.
  2. Control flow. if, switch and a single loop keyword, for, which also covers “while” and infinite loops.
  3. Functions. Functions can return multiple values, which is how Go returns a result and an error together.
  4. Packages. Code is organised into packages and modules. The standard library covers HTTP, JSON, file I/O, testing and more without third-party dependencies.
  5. Pointers. Go passes everything by value. A pointer lets a function modify the caller’s variable or avoid copying a large struct.
  6. Concurrency. Goroutines run functions concurrently, and channels pass values between them.
  • Keep it plain. Idiomatic Go favours obvious code over clever code. If a reviewer has to stop and decode a line, rewrite it.
  • Handle every error. Check err where it’s returned and add context with fmt.Errorf("reading config: %w", err) rather than discarding it.
  • Use concurrency where it helps. Goroutines suit I/O-bound and independent work. They add complexity, so don’t reach for them by default, and run your tests with go test -race once you do.
  • Let the tools do the work. Run go fmt and go vet on everything. Formatting arguments disappear when everyone uses the same formatter.
  • Ask for help. Stack Overflow, the Go Forum and the golang-nuts mailing list are all active.

© 2026 David Li · Home · Blog · RSS ·Classic site · Built with Astro, Starlight and three.js · Logos:Font Awesome Free (CC BY 4.0)