Go Version Control and Collaboration Tools for Teams
Go relies on Git and Go modules for versioning and sharing code. See the tags, commands, private module setup and CI checks teams use.
Spread Your Knowledge. Questions with answers, tutorials and articles, newest first.
Go relies on Git and Go modules for versioning and sharing code. See the tags, commands, private module setup and CI checks teams use.
Use Go's standard library for stable general-purpose work and external modules for drivers, SDKs and specialised features. Includes a checklist for choosing.
Start with Go's standard library for common work and add third-party modules only for real gaps. Includes examples and a decision checklist.
Build tools compile your Go code into a binary, while deployment tools package, ship and run it. See go build, Docker and Kubernetes examples.
Use Go modules, go build and go install to produce executables, cross-compile with GOOS and GOARCH, and publish libraries with semantic version tags.
Documentation describes how Go code behaves for readers. A specification defines required behaviour that the compiler, tests or schemas can check.
How to use doc comments, package comments, go doc and inline comments to explain the design and implementation of Go programs.
Benchmarks give repeatable timing and allocation numbers, and traces show how goroutines, processors and the GC behaved in a run. Learn which to use.
Measure Go performance with benchmarks, benchstat, pprof CPU and heap profiles, traces and escape analysis, then optimise with evidence.
Testing proves behaviour stays correct; debugging finds why it does not. See the Go tools for each, with working examples for go test, fuzzing and Delve.
Go's built-in testing package covers most needs. See table-driven tests, interface-based fakes, and when to add gomock, mockery or testify.
Contexts propagate cancellation between goroutines, and signals tell the process to stop. See how signal.NotifyContext joins them for a clean, graceful shutdown.
Use Go's context package to cancel goroutines, set timeouts and deadlines, propagate cancellation through call chains and pass request-scoped values.
A WaitGroup lets one goroutine wait for many to finish, while a barrier makes workers wait for each other. See both in runnable Go code.
Use sync.WaitGroup to wait for goroutines and semaphores to limit how many run at once, with runnable Go examples and errgroup.
In Go, locks are part of the sync package. Learn how Mutex and RWMutex protect data, how WaitGroup and Once coordinate goroutines, and common pitfalls.
Shared data and goroutines need synchronisation. See when to use Mutex, RWMutex, WaitGroup, Once and atomic types, and how to find races.
Use select with time.After for simple timeouts and context for cancellation. Compare both and avoid goroutine leaks in Go channel code.
Time out Go channel operations with select, time.After and context deadlines, and stop the underlying goroutine so nothing leaks.
A buffered channel stores values until its capacity is full, while an unbuffered channel blocks until sender and receiver meet. Learn when to use each.