Enabling Nightly releases using GoReleaser Pro

GoReleaser Pro v1.11+ added support to keeping a nightly release. That means that, whenever you want, you can run: goreleaser releaser --clean --nightly And it’ll delete previous nightly releases and create a new one with the current commit artifacts. To enable it, you&rsqu...

Shipping completions for Go CLIs using GoReleaser and Cobra

Everyone likes command line completions, so much that some even install extra tools just to have them. But you don’t need to install anything just for completions: Bash, Fish and ZSH all support it out of the box! In this post I’ll show you how to ship completions for...

How I used Go to make my radio auto-switch to AUX-IN when a Raspi plays music

Ok, so your radio lacks AirPlay support but has an auxiliary input and can be remote-controlled via the Frontier Silicon API. Fetch a Raspberry Pi, put Shairport-sync and Raspotify on it, plug it into the AUX port, and glue everything together with some Go code. Et voilà - home...

Introducing the `tidied` tool, to more easily check whether `go mod tidy` has been run

If you're working with Go projects that use Go modules, you may be aware of the format of the go.mod and go.sum, which are used to track dependencies and their checksums respectfully. For instance, if we take the following go.mod, you'll notice there are two sections for dependen...

Some resources for looking at the current development version of Go

The C <code>free()</code> API means memory allocation must save some metadata

Converting HTTP requests to Wiremock stubs, with Go

If you're using Wiremock, sometimes you want to be able to quickly generate stub mappings from an existing server, rather than hand-crafting it yourself, to give you a like-for-like stub. I've written the following - somewhat hacky - script to produce a Wiremock stub mapping from...

Learning a new language, or how I gained familiarity with Go

Every so often, engineers need to pick up a new language. After ~6 years of professional development using Java, with a bit of Ruby sprinkled in, coming to Deliveroo meant that I'd be starting to work on some Go codebases. So when it came to accepting the offer, I ended up thinki...

Rob Pike's simple C regex matcher in Go

Translating Rob Pike's simple and elegant C regex matcher to Go.

SSH Tips and Tricks

Since I joined Charm, I&rsquo;ve been working and learning more about SSH, and I thought I would share a few quick tips and tricks with you. Forward Yubikey Agent If you use a Yubikey (you should), you can use it in your remotes by having the key in a SSH agent and forwarding it....