Go
Go is a programming language designed at Google with a particular focus on concurrency. Apps written in Go include Docker, Kubernetes, and Caddy (the web server that runs this blog).
I started learning Go in summer 2025, when I started working at Tailscale (which uses Go for both the end-user client and back-end coordination server).
2 articles
Quick-and-dirty print debugging in Go
I wrote a Go module to help with my print debugging, which logs expressions and values to a separate file.
Finding SNS topics without any subscriptions
I’m trying out Go, and I wrote a tool to help me find SNS topics that don’t have any subscriptions.
8 notes
Create a file atomically in Go
Use
os.CreateTempto create a temporary file in the target directory, then do an atomic rename once you’ve finished writing.Use the
-vflag to get verbose output from Go testsThis prints all
t.Logandt.Logfcalls, even if the test succeeds or times out.Using Go to write to a file, but only if it doesn’t exist yet
Opening a file with
os.O_CREATE|os.O_EXCLwill ensure you only create the file if it doesn’t already exist.Repeatedly run flaky Go tests with
stressIt runs your test hundreds of times, which can be useful for finding flaky failures.
How to list the tests that will be run by a
go testcommandUse
go test -list={pattern}.You can change the size of tabs on web pages with the
tab-sizepropertyGo’s compiler is smart enough to spot division by zero errors
Parsing JSON in Go with a required field