Go Debugging and Error Reporting: Delve, Race Detector, slog
Find and fix bugs in Go using error wrapping, Delve, the race detector, panic recovery, slog logging, pprof and runtime trace.
Spread Your Knowledge. Questions with answers, tutorials and articles, newest first.
Find and fix bugs in Go using error wrapping, Delve, the race detector, panic recovery, slog logging, pprof and runtime trace.
Performance optimisation makes Go code faster, resource management keeps it stable. Learn pprof, GOGC, GOMEMLIMIT, pools and bounded concurrency.
A practical Go performance workflow: benchmark, profile with pprof, reduce allocations, bound concurrency, tune the GC and enable PGO.
Platform-specific Go code uses OS or CPU features selected with build constraints, while portable code relies on the standard library. See when to use each, with examples.
How to cross-compile Go with GOOS and GOARCH, use build constraints for platform-specific code and package multi-platform binaries and Docker images.
Compare Go's runtime package with platform APIs such as os, filepath and build constraints, and learn which to use to adapt code to each OS.
Use Go's os, os/exec, os/signal and runtime packages to manage files, processes, signals and resources, with x/sys for platform-specific calls.
Slices, maps and structs live in memory, while databases persist and share data. See the trade-offs and when each is the right tool in a Go program.
A practical guide to Go slices, maps and structs, plus sorting, binary search and generic helpers from the slices and maps packages.
Concurrency is how a Go program is structured, parallelism is running goroutines on several cores at once. See the scheduler, GOMAXPROCS and examples.
Go parallelises with goroutines and worker pools on one machine, and scales out with services, queues and orchestration. See examples and guidance.
Serialization turns Go values into bytes and compression makes those bytes smaller. Compare the main formats and see a runnable JSON plus gzip example.
How to encode and decode data in Go using JSON, XML, gob and Protocol Buffers, with struct tags, streaming and a format comparison.
net and net/http handle communication between processes; database/sql provides pooled access to SQL databases. See examples and how they work together.
Go's standard library covers TCP, HTTP servers, clients and TLS. See working examples with Go 1.22 routing, timeouts, contexts and graceful shutdown.
Go separates language visibility from real access control. Learn exported names, crypto helpers and role-based middleware for secure Go programs.
Use AES-GCM, crypto/rand, HMAC, password hashing and TLS from Go's standard library to protect stored data and network traffic, with working code.
The build pipeline compiles, the test pipeline verifies, and the release pipeline versions and publishes. See Go commands and a CI example for each.
Build a Go CI/CD pipeline: module checks, vet, race tests, vulnerability scans, versioned builds and container deployment, with a GitHub Actions example.
Git stores history and tags; Go modules resolve and verify dependency versions via the proxy and go.sum. Learn the workflow for sharing Go code across projects.