I spent the weekend rewriting qs, the query-string parser bundled inside Express, used across a huge chunk of the Node ecosystem to Go language. This is what actually happened: what I picked, where my first version was wrong, how I checked that the rewrite behaves the same as the original.
Why qs, why Go
I wanted a library that mattered and a library I could actually finish. qs fit both: 8.9k stars on github, a real dependency in a lot of production code, and about 1,000 lines of core logic. To port properly in a weekend instead of half-porting something bigger.
Go was the target for a specific reason, not just because "Go is fast." qs today only runs inside a Node process ; npm install, node_modules, a JS runtime spinning up to split a query string. A Go port compiles to a single static binary with no runtime and, if I did it right, no external dependencies at all. That last part turned out to matter more than I expected, because it ruled out the easy way to handle one particular edge case (more on that below).
The hackathon's rule made the whole thing harder in a useful way: the port has to pass the original test suite, completely unmodified, not a rewritten version of it that matches my own understanding of the spec.






