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...

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...

Exploring function parameter types with Go tooling

I enjoy hacking on Go tooling (Go programs that analyze and manipulate other Go programs), and a few weeks ago an interesting Stack Overflow question caught my attention. Given a function with a parameter of some structure type: func foo(param SomeType) {} How can we examine the...

Pointing to a fork of a Go module

Update 2023-09-20: If you're writing a module that is consumed through go install, check out this separate post to avoid a gotcha. If you're building on top of an Open Source Go library through Go modules, there may be times that you need to use a forked version of the project, s...

Announcing GoReleaser v1.10 — the summer release

Fun fact: it is actually winter now here in Brazil. Regardless, this release is packed with new features, quality-of-life improvements and bug fixes! GoReleaser screenshot Highlights GoReleaser Pro can now skip global after hooks with -skip-after; GoReleaser Pr...

Running Go tests in Parallel

If you're writing software in Go, you're likely to not be hitting any particularly slow tests, as the language and tooling is very efficient. But as written about in Default Your Tests to run in Parallel, I recommend always running in parallel, so you can surface implementation i...

Ignoring slow-running tests in Go

If you're writing software in Go, you're likely to not be hitting any particularly slow tests, as the language and tooling is very efficient. But sometimes there are tests that you don't want to execute when go test is run, for instance if they're full integration/application tes...