Skip to content

Glossary

Go’s vocabulary is small but precise, and several terms mean something narrower here than they do in other languages. When a lesson uses a word you are unsure about, look it up here.

TermMeaning
GoroutineA unit of concurrent work, scheduled by the Go runtime rather than the operating system.
SchedulerThe runtime component that maps goroutines onto OS threads.
RuntimeThe Go code linked into every binary that provides scheduling, memory management, and garbage collection.
StackMemory for local variables and the call chain. Each goroutine starts with a small one and grows it on demand.
HeapMemory for values that escape their function’s stack frame. Escape analysis decides what goes here — not the value’s lifetime in any intuitive sense.
Garbage collector (GC)Reclaims unreachable heap memory concurrently with your program.
Escape analysisThe compiler’s decision about whether a value can stay on the stack or must be heap-allocated.
Context switchSwapping one goroutine for another on a thread.
PreemptionForcing a running goroutine to yield so others can run.
TermMeaning
Memory allocationReserving memory for a value.
Memory layoutHow a value’s parts are arranged in memory, including padding.
Heap allocationAn allocation the garbage collector must later reclaim.
Stack allocationAn allocation freed automatically when the function returns.
Stack growthThe runtime copying a goroutine’s stack to a larger one when it runs out.
PointerA value holding the address of another value. Go has no pointer arithmetic.
Work stealingAn idle processor taking queued goroutines from a busy one.
TermMeaning
ChannelA typed conduit that passes values between goroutines and synchronizes them.
MutexA lock giving one goroutine at a time access to shared state.
RWMutexA lock allowing many concurrent readers or one writer.
AtomicAn operation other goroutines observe as indivisible — never half-done.
WaitGroupA counter used to wait for a set of goroutines to finish.
SelectWaits on several channel operations at once and proceeds with one that is ready.
DeadlockGoroutines waiting on each other such that none can proceed.
Race conditionTwo goroutines touching the same state concurrently with no synchronization, at least one of them writing.
ContextA value carrying a deadline, a cancellation signal, and request-scoped values across API boundaries.
SymbolMeaning
GGoroutine — the unit of work.
MMachine — an OS thread.
PProcessor — the scheduling context that lets an M run Go code. GOMAXPROCS sets how many exist.
TermMeaning
InterfaceA named set of method signatures.
SatisfyA type has all of an interface’s methods and can therefore be used as it — no declaration required.
Type assertionExtracting or testing the concrete type inside an interface value. Not a conversion.
Method setThe methods bound to a type, which decides the interfaces it satisfies. Pointer and value receivers give different sets.
EmbeddingIncluding one type as an unnamed field of another so its fields and methods are promoted.
PromoteAn embedded type’s field or method becoming callable directly on the outer type.
Zero valueThe value every type gets when declared without an initializer.
ReflectionInspecting types and values at runtime.
AssemblyThe assembly language the Go compiler emits.
CompilerTranslates Go source into machine code.
LinkerCombines compiled packages into a single executable.
TermMeaning
Sentinel errorA predeclared error value callers compare against, such as io.EOF.
Wrap / unwrapEnclosing an error inside another with %w so the chain survives for errors.Is and errors.As.
Error chainThe nested sequence of wrapped errors.
PanicStopping normal execution and unwinding the call stack.
RecoverCapturing a panic inside a deferred function so execution can continue.
TermMeaning
Type parameterA type variable declared in square brackets on a function or type.
ConstraintAn interface that limits what a type parameter may be.
Type setThe set of types a constraint permits.
InstantiateSupplying concrete types to a generic function or type.
Type inferenceThe compiler deducing type arguments from the values you pass.
TermMeaning
IteratorA function range can loop over, matching iter.Seq or iter.Seq2.
YieldThe callback an iterator calls to hand out each value.
Push / pullA push iterator drives the loop body; a pull iterator (iter.Pull) lets the caller ask for the next value.
TermMeaning
Marshal / unmarshalConverting Go values to JSON and back.
Struct tagA string after a field that packages such as encoding/json read through reflection.
Reader / WriterThe one-method interfaces the whole standard library composes around — io.Reader and io.Writer.
BufferAn in-memory staging area that reduces the number of system calls.
DurationA span of time as an int64 count of nanoseconds, with its own type.
LayoutThe reference-time string Go uses instead of format specifiers, for example 2006-01-02.
TermMeaning
Table-driven testCases held in a slice of structs and run in a loop.
SubtestA nested test created with t.Run, separately named and separately runnable.
BenchmarkA measurement of time and allocations per operation.
CoverageThe share of statements a test run executed.
Race detectorA runtime tool that reports data races that actually occurred during a run.
Static analysisChecking code without running it, as go vet and staticcheck do.
ModuleThe unit of versioning and distribution, defined by one go.mod.
PackageThe unit of compilation and name scoping — one directory.
ChecksumThe hash in go.sum that proves a dependency was not modified.
MVSMinimal Version Selection — Go picks the lowest version satisfying every requirement.