ctap (or: reasons I like Go and modern tooling)
So this weekend I scratched a long-standing itch and whipped up
a little utility for colourising
output. It's called ctap
and is now available on
Github.
I have a bunch of processes that spit out TAP output at various points as tests are run on outputs, and having the output coloured for fast scanning is a surprisingly significant UX improvement.
I've been a happy user of the javascript
tap-colorize
utility for quite a while, and it does the job nicely.
Unfortunately, it's not packaged (afaict) on either CentOS or
Ubuntu, which means you typically have to install from source
via npm
, which is fine on a laptop, but a PITA on a server.
And though I'm pretty comfortable building I've always found node packages to be more bother than they're worth.
Which brings us back to ctap this weekend. Given how simple the TAP protocol is, I figured building an MVP colouriser couldn't more than an hour or two - and so it turned out.
But what's really nice is all the modern tooling that provides you with impressive boosts as you go these days. On this project that included:
nice unit tests using Go's standard test tools
code quality checks using e.g.
go vet
, golint, gocyclo, and greportcardsuper-easy release builds using GoReleaser, which cross-compiles packages for Linux (Ubuntu and RedHat), as well as Macintosh and Windows packages, and binary/source tarballs
automatic test runs on every commit using Github Actions, again covering Linux and Macintosh and Windows environments, and multiple versions of go
These are fun times to be a software engineer!
blog comments powered by Disqus