Releasing a Go library for content-type negotiation

As I've written about in the past, I'm a big fan of using Server-Driven Content Negotiation for APIs for versioning, but also find it handy for being able to serve different representations of data depending on what the client supports. This is handy to be able to serve an HTML p...

Tools I use to build my website

How I build my website benhoyt.com with GitHub Pages, Jekyll, a simple HTML+CSS layout, Sublime Text, and Sublime Merge.

Snake game in Go using Ebiten

Ebiten is an open source game library in Go for building 2D games that can be ran across multiple platforms. Ebiten games work on desktop, web browsers (through WebAssembly), as well as on Mobile and even on Nintendo Switch.

Using generics to get a pointer to any type, in Go

In Go, we use pointers to define that a value may be optional. Often, we'll use the & operator to provide the pointer value to a method, so we can do something like this: method(&api.Response{}) The issue is that not every type can use the & operator, for instance we...

Print based debugging and infrequent developers

Optional configuration for configuring Go code

When you're writing a reusable piece of code in a library, you often want to allow your code to be extensible to a point, in a way that allows safely modify behaviour without exposing too many of the internal workings. A pattern that seems to be working really well in Go is by pr...

spf13 Google -->

I’m leaving my role as the Product Lead for the Go Language at Google. I’m super proud of everything the Go team has accomplished in the last six years, and I’ve never been more excited for Go’s future. Read on if you’re interested in what led me to my decis...

spf13 Google -->

I’m leaving my role as the Product Lead for the Go Language at Google. I’m super proud of everything the Go team has accomplished in the last six years, and I’ve never been more excited for Go’s future. Read on if you’re interested in what led me to my decis...

How to get (or recognize) a common Unix log timestamp format in things

Building a Go RESTful API with design-first OpenAPI contracts

As mentioned in my post about Shipping services more quickly with design-first OpenAPI contracts, I've recently been working on a fair bit of OpenAPI-driven design-first APIs, in Go. For more info on what that is, and why you'd want to do it, I'd recommend having a read of that p...