tparse appreciation
If you asked me to describe my (Go) developer toolchain essentials, I’d probably rattle off…
macOS, zsh, git & GitHub, Docker, Kubernetes & kubectl
,
GoLand, golangci-lint
,
and ngrok
?
But sometimes you don’t appreciate things until they’re gone.
If you practice a tight feedback loop,
as I very much do, you could be running go test
dozens or hundreds of times a day.
Overall, I find the Go testing framework to be lovely to work with, and I consider it an
integral part of the platform’s success. However, I feel that the default output format of go test
leaves
a little to be desired. In large test suites, e.g. as might be seen
in a sq
test run,
it’s burdensome to find test failures in the wall of output.
The -json
format is even weaker: it’s just barely structured,
and feels like a low-effort addition to make the output technically JSON. But for
both of these formats, there’s already a whole tool ecosystem that depends on the current output
format details, so there’s little expectation of change.
Enter tparse
: it’s a wrapper around go test
,
and I find its output much more suited to my local dev workflow. Give it a try.
The trigger for this post is that the most recent release of tparse
panics on my
sq
test run. I’ve filed a bug report, but for
now I’ve had to roll back to an older version of tparse
. Hopefully that’ll be patched
up soon, but in the meantime: I 😍 you, tparse
. Come back to me.
UPDATE 2023-11-18: The
tparse
author has fixed the bug, and released v0.13.2, resolving the issue. Huzzah!