Setting up a matrix for GitHub Actions with Go's go.mod
and specific versions (2 mins read).

How to use a Go setup matrix in GitHub Actions that can target the go.mod
version and arbitrary other version(s).
Setting up a matrix for GitHub Actions with Go's go.mod
and specific versions (2 mins read).
How to use a Go setup matrix in GitHub Actions that can target the go.mod
version and arbitrary other version(s).
Go’s <code>defer</code> and <code>t.Cleanup</code> have similar semantics, but there’s a good reason to prefer the use of <code>t.Cleanup</code> specifically in the presence of parallel subtests.
Creating global middleware for net/http
servers in Go (1 mins read).
How to wrap net/http
servers in Go with middleware(s) on every request.
What Go versions are my modules and dependencies targeting? (1 mins read).
Without using go mod vendor
, how you can look at the version of Go that each of your modules and dependencies target.
Why is Go trying to upgrade my go.mod
to Go 1.21? (1 mins read).
Why you may be seeing Go trying to upgrade the Go version in your go.mod
to Go 1.21.
Amazon Web Services (AWS) is deprecating the go1.x runtime on Lambda, this is currently scheduled for December 31, 2023. Customers need to migrate their Go based lambda functions to the al2.provided runtime, which uses Amazon Linux 2 as the execution environment. I think this is a bad thing for a couple of reasons: There is no automated migration path from existing Go Lambda functions to the new custom runtime. Customers will need to manually refactor and migrate each function to this new runtime, which this is time-consuming and error-prone.
How and why we started annotating all our Go tests with <code>t.Parallel()</code>, and why you might want to consider doing so too.
Alex shares his insights from building half a dozen popular Go CLIs. Which can you apply to your projects?
Go is built for grug brained programmers like me. grug brain developer not so smart, but grug brain developer program many long year and learn some things although mostly still confused
This page contains the data that is available to the go list command, we use golang templates to extract subsets of this data below Get imports for the current directory package go list -f '{{range β¦
Running commands against every module in a Go multi-module project (1 mins read).
How to run commands like go test
when using a multi-module Go project.
How do you test a database without a database? Don't worry, this isn't one of those Zen puzzles. I have something more practical, but equally enlightening, in mind. Letβs use the adapter pattern to solve the riddle.
Analysing GitHub Pull Request review times with SQLite and Go (3 mins read).
How measuring how long code review took as a team lead to being able to change our processes, and then deliver much more effectively.
We're excited to announce that Socket now supports the Go programming language.
In many languages, on of the things I find myself doing is maping over a list to extract some field. For example, coverting a []Person to []Name. Most languages these days have ways to do this pretty easily: Kotlin: people.map { it.Name } JavaScript: people.map(p => p.Name) Rust: people.map(|p| p.Name) Scala: people.map(_.Name) With generics, Go finally can do this in a type safe manner: Map(people, func(t Person) string { return t.
Last week AWS published a blog post advising that the go1.x Lambda runtime will be deprecated and people should migrate to provided.al2. I was already using the newer runtime, but I also learned from the blog post that AWS SAM can now build Go Lambda functions for the newer runtime - no more Makefiles required!
Announcing golang.org/x/tools/cmd/gonew, an experimental tool for starting new Go projects from predefined templates
Go 1.21 has some awesome new functionality that improves the developer experience and performance.
A beautiful program to read your RSS/Atom feeds right in the terminal! - GitHub - TypicalAM/goread: A beautiful program to read your RSS/Atom feeds right in the terminal!
Nice to see that the excellent gorilla/mux may have been revived
Introducing dmd-web
, a web frontend for Dependency Management Data (DMD) (2 mins read).
Introducing a web frontend for the dependency-management-data project, to provide a better, centralised interface for interacting with the data.
An elegant way of combining test transactions with Go’s built-in test abstractions.
Sharing state between net/http
method calls in Go (1 mins read).
How to construct a struct
in Go that can have its state shared between HTTP server handler functions.
Learn about the upcoming go1.21 performance improvements that reduce the overhead of execution tracing from up to 20% to less than 1% for most applications.
Using go.mod
versions to go install
a binary (1 mins read).
How to use go install
to install a binary from the version tracked in go.mod
.
Checking the migration status with golang-migrate
(1 mins read).
How to check what version of the schema is curently applied when using golang-migrate
.
Go bindings to SQLite using Wazero. Contribute to ncruces/go-sqlite3 development by creating an account on GitHub.
Introducing openapi-sorbet
, a command-line tool for generating Sorbet types from OpenAPI (2 mins read).
How to generate Sorbet type-checked models from OpenAPI specifications.
A tool to show what AWS account and identity you're using. - GitHub - benkehoe/aws-whoami-golang: A tool to show what AWS account and identity you're using.
A simple, fast, and fun package for building command line apps in Go - GitHub - urfave/cli: A simple, fast, and fun package for building command line apps in Go
Go subcommand library. Contribute to google/subcommands development by creating an account on GitHub.
Getting a --version
flag for Cobra CLIs in Go (2 mins read).
How to get Cobra to provide a --version
flag.
Importable package that parses version info from debug.ReadBuildInfo(). - GitHub - carlmjohnson/versioninfo: Importable package that parses version info from debug.ReadBuildInfo().
The Lazy engineer's guide to running your Go web application to AWS Lambda (4 mins read).
How to take a Go web application and move it to AWS Lambda with two lines of code.
Upgrading a Go project from pgx v4 to v5, and more specifically, from sqlc’s <code>pgx/v4</code> to <code>pgx/v5</code> driver (the hard part).
Which OS and CPU architecture is this binary compiled for? (4 mins read).
How to use Go to parse an arbitrary executable to work out the Operating System and CPU architecture it's compiled for.
Creating an HTTP 404 handler for Go net/http
servers (2 mins read).
How to add a catch-all 404 handler when writing HTTP servers with Go's net/http
server.
π 100 Go Mistakes and How to Avoid Them. Contribute to teivah/100-go-mistakes development by creating an account on GitHub.
Made by a minimal, responsible and friendly person.
Serving the current directory over HTTP with Go (1 mins read).
How to use Go's standard library to serve the current directory over HTTP.
Touring the ORM and Postgres landscape in Go, and why sqlc is today’s top pick.
Generates Go (golang) Structs from JSON schema. Contribute to elastic/go-json-schema-generate development by creating an account on GitHub.
Extension handlers for the slog library. Contribute to galecore/xslog development by creating an account on GitHub.