Functions In Templates—Embrace Or Avoid? Mar 30, 2025Go's templates allow defining custom functions for use inside the template. Nice, but type safety gets overboard. Are they still worth using?
JSON Lines Feb 27, 2024This happens when JSON and CSV have a baby. (And how your Go code can benefit from it.)
No Risk, No Fun? Beware Of Careless Use Of MCP Apr 06, 2025Letting an LLM code some tool in Go can be nice, especially when it uses tools via MCP. But there are some risks involved.
Optimize Memory Usage With slices.Clip ... NOT! Mar 16, 2025Clipping a slice doesn't free any memory. What is slices.Clip() good for then?
A Delve Debugger Cheatsheet Mar 02, 2025Debuggers tend to go overboard with features and subcommands. This Delve cheatsheet lists the most important commands that cover 90% of all use cases.
Is []*T faster than []T? Nov 04, 2023Is a slice of values faster than a slice of pointers? Does it even matter?
Killing Me Softly, Or: How Goroutines Want To Exit Feb 16, 2025POSIX threads have an array of control functions, goroutines have none. When to exit is a goroutine's decision. Here's how to properly stop them from the outside.
Avoid Anonymous Types Feb 09, 2025Anonymous types may seem like a suitable shortcut for simple scenarios, but the drawbacks don't outweigh the (perceived) benefits.
Weak Pointers Jan 26, 2025I would have called them modest pointers. They are unobtrusive and don't leave any garbage behind.