Boring Go

Author

K19G

Published

September 13, 2026

Updated

September 13, 2026

Boring Go

Updated for Go 1.27

A linear guide to writing Go the way it actually works in long-lived projects: simple, explicit, and a little boring. Clarity beats novelty. Readability beats magic. The boring default is usually the one that still compiles, still tests, and still makes sense six months later.

Baseline: Go 1.27 · toolchain go (modules, gofmt, go vet, go test, govulncheck). Completely self-contained. You do not need any other title in this library.

Who this is for

  • People who have never written Go and want a complete path, not a bag of tricks.
  • Working developers who can already go run something, but want better defaults.
  • Anyone building services, CLIs, or tools who is tired of clever abstractions.

You do not need prior Go. You do need a terminal, a text editor, and a willingness to type the examples.

What “boring” means here

Go is a small language on purpose. Well-written Go looks repetitive. Names are long. Errors are checked. Interfaces are small. Generics appear when they remove duplication, not when they impress a reviewer.

That is not a limitation. It is the product.

Each chapter teaches the default that lasts, then shows the trap that looks smarter for a week.

How to read

  1. Read a chapter.
  2. Copy the program into main.go (or the filename in the comment).
  3. Run it with go run . (or go test when the chapter says so).
  4. Change one thing. Run it again.
  5. Do the Try this exercises before moving on.

The book is designed to be read front to back. You can jump to errors, testing, or concurrency if you already write Go — but the early chapters define the vocabulary later chapters assume.

How examples work

Every Go listing is a complete, runnable program (or a complete test file). Nothing is a fragment that “you should imagine the rest of.”

// hello.go
package main

import "fmt"

func main() {
    fmt.Println("hello, desk")
}
go run hello.go
hello, desk

When a chapter needs more than one file (go.mod plus main.go, or _test.go beside the code), both files are shown in the chapter. There is no separate examples directory.

A small desk (orders, tickets, shifts) shows up across chapters so types, methods, errors, and tests feel like one codebase — but each listing still runs on its own.

Map of the book

Part Folder What you leave with
1 01-foundations Why Go exists, install, packages, a language tour
2 02-toolchain go commands, format/vet/doc, modules, workspaces, tool pins
3 03-types-and-values Predeclared types, zeros, constants, scope
4 04-control-flow if, switch, for, range
5 05-composite-types Arrays, slices, strings, maps, structs
6 06-functions-and-methods Functions, closures, methods, receivers
7 07-memory Stack/heap, pointers, sharing, GC
8 08-interfaces Implicit interfaces, design rules, assertions
9 09-generics Type parameters and Go 1.27 generic methods, used where they earn their keep
10 10-errors Errors as values, wrapping, panic/recover
11 11-testing Table tests, coverage, fuzz, integration
12 12-concurrency Goroutines, channels, sync, context
13 13-stdlib time, io, encoding, HTTP, log/slog, strings/strconv, slices/sort, os/flag, regexp, maps, iter, signal, crypto, filepath, database/sql, json/v2, omitzero, uuid
14 14-shipping Vet/vuln, generate/embed, release, docs as API
15 15-long-term Reflect, unsafe, cgo, pprof, design that lasts
99 99-appendices Glossary and command cheat sheet

What this book is not

  • Not a framework tutorial.
  • Not a catalog of every standard-library package.
  • Not a collection of interview puzzles.
  • Not a runtime-internals encyclopedia.

It is a guide to writing Go that stays understandable when the requirements change.

Formats

HTML, PDF, and EPUB via the library portal.