Lexical Scanning in Go - Rob Pike
Overview
Rob Pike shows how the Go text/template lexer is built, using state functions, goroutines and channels. The talk was given at a Google Technology User Group in Sydney in 2011.
On Hacker News
HN returns to it for years as an elegant introduction to writing a lexer that is easy to follow even without a parsing background.
Topics
Sources
Video by GoogleFOSSSydney, played through YouTube.
Data and selection notes
HN summaries and labels may contain AI errors. HN dates refer to discussions, not video publication.
HN Library: HackerTube export (2026-10-31) and open-index/hacker-news. Upstream summaries and classifications may contain AI errors.
Views, duration and playback status refresh separately from the published catalog. When an update fails, existing data remains visible.
Selection checks
- SaaS & AI candidates: Topic keywords do not match
- Editor-approved picks: Editorial review is required
What people said