Go
10 articles
-
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.
-
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.
-
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.
-
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.
-
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.
-
Install the Go Toolchain and Configure PATH, GOROOT, and GOPATH on Linux, macOS, and Windows
Install Go using the standard installer for your platform, configure PATH, verify the selected binary, and initialize a module for your first project.
-
Go for Loops: Range Semantics and Loop Variable Capture Before and After Go 1.22
Understand how Go 1.22 module boundaries change captured loop variables, how older code behaves, and how to make captures safe in earlier modules.
-
Managing Go Versions and Toolchains Across Projects
Use Go 1.21 or newer to declare each module’s minimum language version and let the go command select the toolchain requested by that project.
-
Using Maps in Go: Declarations, Lookups, and Iteration
Learn how to initialize Go maps, distinguish missing keys from zero values, delete entries, and iterate without relying on order.
-
Set Up and Configure golangci-lint for a Go Project
Install a known golangci-lint release, create a v2 configuration, verify enabled linters, and keep local and CI commands aligned.










