Morse code is a stream problem wearing a history costume. Signals arrive one at a time — a short beep, a long beep, a pause — and the decoder has to turn that stream into text without ever seeing the future. Go is an unusually good fit for this shape of problem: goroutines map naturally onto pipeline stages, channels carry timed events between them, and the whole decoder stays small enough to read in one sitting.
In this article we will build a streaming Morse decoder in Go. Text goes in as timed on/off events, decoded characters come out the other end, and every stage runs concurrently.…