Go in Production: Practical Go Engineering
Explore Go patterns and tradeoffs through concrete examples and debugging lessons, from goroutines and context cancellation to profiling and memory use.
25 articles · by Niko Minadze
Build HTTP services and handle external dependencies2 Control work with cancellation and bounds1 Represent and transform data safely15 Set up and maintain Go projects and tooling4 Verify behavior and measure performance3
Represent and transform data safely
Use a map-backed pass to keep the first occurrence of each comparable value, an equality function for other values, or sorting and compacting when order can change.
5 November 2026
Read article ↗
Represent and transform data safely
Use `slices.Index` for the first matching position, `slices.Contains` for membership, and a loop when a predicate defines the match.
4 November 2026
membership search slices
Represent and transform data safely
Use a range loop for a straightforward `[]int` total, or a third-party reducer when the callback makes a more varied calculation easier to express.
3 November 2026
aggregation generics slices
Represent and transform data safely
Find the largest value in a Go slice with a one-pass loop or slices.Max, while making empty-input behavior explicit.
1 November 2026
empty input maximum slices
Represent and transform data safely
Use sort.Slice for a one-off descending comparison, or define sort.Interface when the ordering is worth reusing.
31 October 2026
ordering slices sorting
Verify behavior and measure performance
Use Go 1.27’s experimental portable SIMD API for an in-place subtraction loop, check every tail length, and benchmark it against scalar Go.
29 October 2026
benchmarking Go 1.27 SIMD
Represent and transform data safely
Use a type assertion to retrieve a string held by an interface, or fmt to produce a textual representation of another value.
27 October 2026
formatting interfaces type assertions
Verify behavior and measure performance
Compare equivalent work, measure the metric behind your decision, and record enough about the setup to explain both results and surprises.
26 October 2026
benchmarking performance reproducibility
Set up and maintain Go projects and tooling
Run a test to fetch dependencies it needs, use go mod download to prefetch modules, and inspect the cache location with go env.
24 October 2026
dependencies module cache modules
Represent and transform data safely
If an interface requires a pointer-receiver method, pass a pointer to the struct: the struct value itself does not satisfy that interface.
23 October 2026
interfaces method sets pointer receivers