Announcing GoReleaser v1.12 — the more-than-a-hundred commits release

The previous release had ~100 commits, and this one has 149 since previous feature release! Definitely a big release, with some big features. Let’s dive in! GoReleaser Pro release using the new split/merge feature Highlights GoReleaser Pro can now split an...

A complete guide to working with Cookies in Go

In this post we're going to run through how to use cookies in your Go web application to persist data between HTTP requests for a specific client. We'll start simple, and slowly build up a working application which covers the following topics: Basic reading and writing of cook...

Basic Go tooling for generics

Continuing the recent theme of blog posts about Go tooling, this post will briefly discuss how analysis tools interact with one of Go's newest features - generics. As usual, this post provides a motivating example and discusses a couple of approaches to writing a tool. The full c...

The C <code>free()</code> API gives libraries and functions useful freedom

Creating a tag and releasing from a GitHub Action, with GoReleaser

Most people run GoReleaser by creating a tag locally, pushing it, and letting their CI takes care of the matter. Another lesser known option is to leverage workflow_dispatch on a GitHub Action to create the tag locally, and then &ldquo;auto-creating&rdquo; the tag once the releas...

C's <code>malloc()</code> and <code>free()</code> APIs are reasonable APIs for C

Parent links in Go ASTs

A common question that comes up when writing AST-based tooling in Go is &quot;how do I find a node's parent?&quot;, or more generally, &quot;what are all the ancestors of a given node?&quot; Go's AST package does not come with parent links out of the box; this is a common choice...

Go 1.19 added an <code>atomic.Pointer</code> type that's a generic type

Gotcha: testable examples in Go need an `output` comment

One thing I really like about building libraries in Go is that you can create testable examples as a first-class citizen of the testing framework. This allows writing example code in the repository in a way that can make sure that expected use cases are always valid and do not br...

Announcing GoReleaser v1.11 — the hundred commits release

This release took a while, for all the good reasons: a ton of new features and bug fixes for your delight! Oh, and, over 100 commits! It might be the biggest GoReleaser release in commits made, although I have no data to back it up — except my memory. GoReleaser s...