Why I use separate lexers in my recursive descent parsers

Creating an HTTP 404 handler for Go `net/http` servers

I've recently been writing some HTTP servers using Go's net/http package, and found that trying to add a 404 handler - by default - wasn't super straightforward. As per the net/http documentation: Note that since a pattern ending in a slash names a rooted subtree, the pattern &q...

Fuzz tests in Go

Fuzz testing is Go’s clever way of generating new test inputs that you didn’t think of—and that may flush out some hidden bugs. Stand by for things to get a little fuzzy!

Fuzz tests in Go

Fuzz testing is Go’s clever way of generating new test inputs that you didn’t think of—and that may flush out some hidden bugs. Stand by for things to get a little fuzzy!

Twenty years of blogging

This blog has now been running for 20 years! Twenty years... a significant chunk of a human's adult life; while so many things in my life have changed since May 2003, the blog has remained a constant companion. This milestone inspired me to do some archaeology using the amazing W...

Writing Bubble Tea Tests

Learn how to use x/exp/teatest to write tests for your Bubble Tea apps.

FAAS in Go with WASM, WASI and Rust

This post is best described as a technology demonstration; it melds together web servers, plugins, WebAssembly, Go, Rust and ABIs. Here's what it shows: How to load WASM code with WASI in a Go environment and hook it up to a web server. How to implement web server plugins in …

Announcing GoReleaser v1.18 — the maintainers month release

May is the maintainers month, so I would first like to thank all the maintainers out there for the hard work, you rock!

Quick tip: A time-saving Makefile for your Go projects

Whenever I start a new Go project, one of the first things I do is create a Makefile in the root of my project directory. This Makefile serves two purposes. The first is to automate common admin tasks (like running tests, checking for vulnerabilities, pushing changes to a remo...

Serving the current directory over HTTP with Go

I've recently been updating a few lightweight static websites and have wanted to preview the changes locally. Although I usually reach for python -mhttp.server, it's a bit cumbersome to type, so I wanted something a little shorter. I was thinking of writing a script to make it qu...