How gotestfmt works internally
mainThe gotestfmt architecture is a data pipeline consisting of three main components running in separate goroutines, communicating via channels:
- Tokenizer: Converts raw
go testoutput into a stream of events. - Parser: Interprets tokens to construct logical units like test cases, packages, and package downloads.
- Renderer: Takes the parsed streams and renders them into human-readable text using templates (either baked-in or located in the
.gotestfmtdirectory).