Instant Go

Edit and run Go code right in the browser. No backend required.


Read more

How I turned a binary search tree into a generic data structure with go2go

Some time ago I wrote about how to create a balanced binary search tree. The search keys and the data payload were both plain strings. Now it is time to get rid of this limitation. go2go lets us do that while waiting for the official generics release.


Read more

How to become the richest person on earth (and learn some Go along the way)

Ok, to be frank, this article is mostly about the second part of the title. We will build a market simulation with minimal Go code, and show how the rich get richer even when they are not greedy at all.


Read more

Packaging a project release (goreleaser part 2)

In the previous post, I used goreleaser to add binaries to a project release. Now let's have goreleaser build a Homebrew formula as well. Automatically, and for macOS and Linux alike.


Read more

CLI tools FTW (or: how to distribute your CLI tools with goreleaser)

“go get” is a super-simple way of installing Go binaries, but not everyone has a Go compiler installed. If you want to make your CLI tools and apps available to the world, have a look at goreleaser.


Read more

Cannot import main: a Go Module gotcha

Two questions for you: Do you name an app module simply “main”? And do you happen to write tests for a main package? If so, you are in big trouble! (Ok, that was a bit clickbait-ey…) Well, the world is not exactly going to end; however, you might encounter an unexpected error that is hard to track down.


Read more

Futures in Go, no package required

Futures are mechanisms for decoupling a value from how it was computed. Goroutines and channels allow implementing futures trivially. Does this approach cover all aspects of a future?


Read more

what.Happens - a debug logging package for developers only

Package what provides some handy debug-logging functions that can be enabled and disabled via build flags. No more information leaks in your production code!


Read more

Slow down your code with goroutines

Or: How adding goroutines can keep your CPU busy shuffling things around.


Read more

In the news: Go on AWS Lambda

Just recently, Amazon announced support for Go on AWS Lambda. Here is a summary of last week's news around this topic.


Read more