Go#

A pragmatic, opinionated language designed for building reliable, efficient software at scale — from CLI tools and microservices to infrastructure systems and cloud platforms.

Overview#

Go (Golang) was created at Google in 2009 by Robert Griesemer, Rob Pike, and Ken Thompson to address the pain of building large-scale networked services in C++ and Java. It prioritises simplicity, fast compilation, built-in concurrency, and a rich standard library that covers most needs without third-party dependencies.

Go is the language behind Docker, Kubernetes, Terraform, Prometheus, and much of the cloud-native ecosystem. It compiles to a single static binary with no runtime dependencies, starts instantly, and cross-compiles trivially. If you work in cloud infrastructure, platform engineering, or backend services, Go is a first-class tool.

This path assumes you can already program in at least one language. It focuses on what makes Go different — not on explaining what a variable is.

Prerequisites#

  • Comfortable programming in any language (Python, Java, JavaScript, etc.)
  • Basic command-line proficiency
  • Familiarity with HTTP and JSON (for the standard library sections)

Sections#

#SectionTopics
1Go FundamentalsPhilosophy, toolchain, packages, modules, hello world
2Types & VariablesBasic types, zero values, constants, iota, strings and runes
3Control Flowif, for, switch, defer, range
4FunctionsMultiple returns, variadic, closures, first-class functions
5Structs & MethodsStruct types, embedding, methods, receiver types, tags
6InterfacesImplicit satisfaction, type assertions, key interfaces
7ConcurrencyGoroutines, channels, select, sync primitives, patterns
8Error Handlingerror interface, wrapping, sentinel errors, panic/recover
9GenericsType parameters, constraints, generic functions and types
10Standard Librarynet/http, encoding/json, context, testing, io, slog
11Modules & Toolinggo.mod, testing, linting, profiling, cross-compilation
12Patterns & IdiomsTable-driven tests, functional options, project layout, Docker builds

What Makes Go Different#

FeatureGo’s ApproachContrast
ConcurrencyGoroutines + channels (CSP model)Threads + locks (Java, C++)
Error handlingExplicit returns, no exceptionstry/catch (Java, Python)
InheritanceComposition via embedding, no classesClass hierarchies
GenericsAdded in 1.18, deliberately simpleFull type systems (Rust, Haskell)
DependenciesSingle binary, no runtimeJVM, Node runtime, Python interpreter
Formattinggofmt — one true style, enforcedDebates over style guides
Unused importsCompile errorWarning at best

Go Version#

This path targets Go 1.22+ (2024). Key version milestones:

VersionNotable Additions
1.11Modules (go.mod)
1.13Error wrapping (fmt.Errorf %w)
1.16embed package, io/fs
1.18Generics, fuzzing
1.21log/slog, slices/maps packages
1.22Range over integers, enhanced routing