Post details
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 …
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.
The difference between nil and empty slices are a common point of confusion for newbies to Go. This post discusses how they differ and when to use each one.
🌈 slog.Handler that writes tinted logs. Contribute to lmittmann/tint development by creating an account on GitHub.
TIL that Go Lambda functions now have a nice way to perform cleanup without ugly workarounds.
Aidan W Steele (@__steele)Wed, 29 Mar 2023 06:28 +0000
Generating Equal
methods for Go structs with goderive
(3 mins read).
How to use goderive
to generate an Equal
method between structs, so you don't have to.
Who is going to build it?
What I learned by proposing and implementing a new feature in the Go standard library.