Skip to content

Implementation Principles ​

These chapters explain how Go works under the hood. They are written for readers who already know the language basics and want to understand the runtime instead of treating it as a black box.

Data Structures ​

  • Slices — the slice header, growth strategy and shared backing arrays
  • Map — hash buckets, overflow buckets and incremental expansion
  • Strings — string headers, concatenation and conversions
  • Channel — the hchan structure and its send/receive queues
  • Select — how select picks a ready case
  • sync.Map — the read/write map split used for concurrent access

Runtime ​

Error Handling ​

  • nil — what nil is and when comparisons surprise you
  • defer — how deferred calls are registered and executed
  • panic — the panic/recover mechanism

Concurrency Primitives ​

Networking ​

  • netpoll — the network poller behind non-blocking I/O

Golang by www.golangdev.cn · Adapted in part from Golang 中文学习文档 (MIT, © 寒江蓑笠翁)