TAG
Golang
42 notes
- Go Reflectionhistorical
Runtime type/value inspection, settable values, interfaces, tags, and reflection trade-offs.
- Errors in Gohistorical
Explicit error returns, wrapping, classification, inspection, and preserving operational context.
- Go Interfaceshistorical
Implicit interface satisfaction, dynamic type/value pairs, nil subtleties, and API design.
- Go Functionshistorical
First-class functions, multiple returns, closures, methods, variadics, and value semantics.
- Go Stringshistorical
Immutable byte sequences, UTF-8 conventions, runes, indexing, conversion, and allocation.
- Go Mapshistorical
Hash maps, zero-value reads, mutation, iteration, concurrency rules, and implementation-sensitive internals.
- Go unsafehistorical
Low-level pointer/layout operations, guarantees, portability risks, and containment strategies.
- panic and recoverhistorical
Panic unwinding, deferred cleanup, recovery boundaries, and when not to use panic.
- Go Type Systemhistorical
Defined and alias types, interfaces, method sets, assignability, conversion, generics, and zero values.
- Go Arrayshistorical
Fixed-length value types, copying semantics, indexing, iteration, and their relationship to slices.
- Go Sliceshistorical
Slice descriptors, backing arrays, append/capacity, sharing, copying, and retention pitfalls.
- Go deferhistorical
Deferred calls, LIFO execution, argument evaluation, return interaction, and practical cleanup patterns.
- 2.1 Contexthistorical
Go context trees for cancellation, deadlines, timeouts, and request-scoped values, with lifecycle rules for passing and canceling contexts.
- 2.2 sync.WaitGrouphistorical
Waiting for a group of goroutines to finish with Add, Done, and Wait, including the counter lifecycle and common Add/Wait misuse.
- 2.3 The sync Packagehistorical
A map of Go's shared-memory synchronization primitives: Mutex, RWMutex, Once, Cond, Map, Pool, WaitGroup, and atomic operations.
- 2.4 sync.Maphistorical
Go's specialized concurrent map, its intended workloads, read-optimized internal design, atomic map operations, and when a normal map plus mutex is clearer.
- sync.Poolhistorical
Temporary object reuse, GC interaction, per-P optimization, and when pooling helps.
- 2.6 Selecthistorical
How Go `select` waits on multiple channel operations, chooses among ready cases, uses `default`, handles nil channels, timeouts, and cancellation.
- 2.8 sync.Mutexhistorical
Exclusive access to shared state with Go's Mutex, including zero-value usage, memory-ordering guarantees, critical-section design, and common mistakes.
- 2.9 sync.RWMutexhistorical
Go's reader/writer mutex: concurrent readers, exclusive writers, writer preference, non-upgradable locking, and when RWMutex is actually useful.
- 2.11 Atomic Operationshistorical
Go atomic operations, compare-and-swap, typed atomic values, atomic.Value, memory ordering, and when atomics are appropriate instead of locks.
- 2.12 Channelshistorical
Go channels as typed communication and synchronization primitives: buffered vs. unbuffered behavior, closing, ownership, blocking semantics, and runtime implementation.
- 2.13 Go Concurrencyhistorical
A map of Go concurrency: goroutines, channels, synchronization primitives, the memory model, happens-before relationships, and common concurrency patterns.
- 2.14 Goroutineshistorical
What goroutines are, how `go f(...)` starts concurrent execution, how their stacks differ from OS-thread stacks, and how the runtime schedules them.
- Goroutine Poolshistorical
Bounded concurrency, worker pools, queues, backpressure, and when a goroutine pool is unnecessary.
- 3.1 Go's G-M-P Schedulerhistorical
The Go scheduler's G, M, and P abstractions, local run queues, work stealing, blocking syscalls, GOMAXPROCS, and asynchronous preemption.
- 3.2 Escape Analysishistorical
How the Go compiler decides whether values can live in stack frames or must escape to longer-lived storage, how to inspect decisions, and why `new` does not imply heap allocation.
- Go Build Processhistorical
From parsing and type checking through SSA/optimization, code generation, linking, modules, and build cache.
- Go Memory Managementhistorical
Stacks, heap, allocation, escape analysis, garbage collection, and observable memory metrics.
- Go/Plan 9 Assemblyhistorical
Reading Go assembler syntax, ABI-sensitive registers, stack frames, and generated machine code.
- Memory Alignment in Gohistorical
Alignment, padding, struct layout, cache effects, and portable reasoning about field order.
- 3.7 Go Garbage Collectionhistorical
Go's concurrent tracing garbage collector, mark/sweep phases, write barriers, GC pacing, GOGC, memory limits, observability, and tuning priorities.
- Go Stack Managementhistorical
Small growable goroutine stacks, stack growth, copying, and escape-driven heap allocation.
- Go Heap Managementhistorical
Go runtime heap allocation, size classes, spans, per-P caches, sweeping, and GC interaction.
- Unit Testing in Gohistorical
Testing package conventions, table-driven tests, subtests, race checks, fuzzing, and maintainable boundaries.
- 4.2 pprofhistorical
Profiling Go programs with CPU, heap, allocation, goroutine, mutex, and block profiles, plus a measurement-first workflow for finding performance bottlenecks.
- Go Benchmarkshistorical
Writing repeatable Go benchmarks and interpreting time, allocations, variance, and compiler effects.
- 4.4 Memory Leaks in Gohistorical
How Go programs retain memory through reachable objects, goroutine leaks, timers/channels, and non-Go memory, with a pprof-based diagnostic workflow.
- Go Runtime Tracehistorical
Tracing goroutine scheduling, blocking, GC, network/syscall events, and runtime execution over time.