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
More articles
View archive-
Build HTTP services and handle external dependencies
Download a URL to a File in Go: Check HTTP Errors and Avoid Partial Output
Stream an HTTP response to a caller-chosen path without saving error pages or leaving a partial download at that path.
-
Build HTTP services and handle external dependencies
Go 1.27 UUIDs: What to Check Before Dropping google/uuid
Go 1.27 is reported to add UUID generation and parsing, but replacing a dependency still requires checking the final package API and your supported toolchains.
-
Represent and transform data safely
How to Merge Two Maps in Go
Merge Go maps with a loop or maps.Copy, choose whether to mutate an input, and understand when generics or mergo better fit the job.
-
Represent and transform data safely
How to Use Sets in Go with mapset and Map-Based Sets
Use map[T]struct{} for lightweight membership checks, or mapset v2 when you need typed set operations and a concurrency-oriented implementation.
-
Represent and transform data safely
How to Clone a Map in Go Without Sharing the Underlying Values
Learn when maps.Clone is enough, why reference-valued entries still alias, and how to write a true deep copy for maps containing slices.
-
Represent and transform data safely
How to Implement Enums in Go with iota and Typed Constants
Use a named integer type, typed constants, iota, String methods, and explicit validation to build practical enum-like values in Go.
-
Control work with cancellation and bounds
Using context.Context in Go: Cancellation, Timeouts, and Request-Scoped Values
Learn how to propagate cancellation and deadlines through Go code, clean up derived contexts, and avoid common API design mistakes.
-
Represent and transform data safely
Go Slices: What append, copy, and cap Actually Do to the Underlying Array
Learn how Go slice length, capacity, aliasing, append, and copy determine whether operations reuse or replace the underlying array.
-
Represent and transform data safely
Go Generics: How to Write Type Parameters, Constraints, and Generic Interfaces
Learn how Go type parameters are instantiated, how to choose constraints, and how to build generic functions, types, and interfaces.
-
Verify behavior and measure performance
Running and Testing Go Snippets with the Go Playground
Use the Go Playground to run small programs and tests in a browser while accounting for its fixed clock, restricted I/O, and resource limits.










