Modifying the response body of an httputil.ReverseProxy
response (2 mins read).

How to modify the response from a httputil.ReverseProxy
before it goes back to the caller.
Modifying the response body of an httputil.ReverseProxy
response (2 mins read).
How to modify the response from a httputil.ReverseProxy
before it goes back to the caller.
by Jamie Tanna
.
#blogumentation
#go.
A tool for analyzing the dependencies in compiled Go binaries, providing insight into their impact on the final build. - Zxilly/go-size-analyzer
by Jamie Tanna
.
#go.
Quick thoughts on whether sqlc is still the direction for Go projects now that we’ve been using it for three years.
by Jamie Tanna
.
#sql
#go.
Using Go's database/sql
to query an arbitrary columns of unknown type(s) (3 mins read).
How you can query an unknown number of columns, of unknown types, with Go's SQL package.
by Jamie Tanna
.
#blogumentation
#go.
New release of #oapi-codegen is out 🚀
Big changes are:
net/http
enhanced routingAnd a whole host of other changes, check out the full release notes at https://github.com/deepmap/oapi-codegen/releases/tag/v2.2.0
by Jamie Tanna
.
#go
#openapi
#oapi-codegen.
GoLang architecture linter (checker) tool. Will check all project import path and compare with arch rules defined in yml file. Useful for hexagonal / onion / ddd / mvc and other architectural patte...
by Jamie Tanna
.
#go
#architecture.
Calculating the GitHub API's sha
representation of a local file (2 mins read).
How to locally calculate the same sha
of a given file, so you can compare it against the GitHub API's representation.
by Jamie Tanna
.
#blogumentation
#github
#go.
by Jamie Tanna
.
#go.
by Jamie Tanna
.
#go.
Making it easier to schedule cross-timezones, with the tz
CLI (3 mins read).
Writing a command-line tool with Charm's Go libraries to compare the suitability of meetings across timezones.
by Jamie Tanna
.
#blogumentation
#command-line
#go
#charm
#elastic
#remote-work.
I'm on Cup o' Go! (2 mins read).
Announcing my appearance on Cup o' Go, talking about oapi-codegen
, OpenAPI, working on Open Source and blogging.
by Jamie Tanna
.
#openapi
#oapi-codegen
#podcast
#adhd
#blogging
#public-speaking
#go.
I recently received an issue report that ijq was performing slowly. The issue claimed that, when used on a large (16 MB) JSON file, ijq was “too slow to be usable”. I downloaded the test file which …(https://gpanders.com/blog/making-ijq-fast/)
by Jamie Tanna
.
#go.
Shows how much the performance of Go has improved from version 1.0 through to 1.22 (including PGO) -- in its compiler, runtime, and libraries.
by Jamie Tanna
.
#go.
I made up a neat little pattern in Go the other day. It’s a way to represent a state change in a system by exposing different APIs for different states, while only holding state in a single underlying struct. I’m sure I’m not the first person to invent this, and it may already a name, so please let me know if you know of one. I’m going to show an instance of the pattern first and the motivation after.
by Jamie Tanna
.
#go.
Go queue library built on SQLite and inspired by AWS SQS. - maragudk/goqite
by Jamie Tanna
.
#go
#sqlite.
What routes is my http.ServeMux
listening for? (2 mins read).
How to fairly quickly list the routes that your http.ServeMux
is handling, pre- and post-Go 1.22.
by Jamie Tanna
.
#blogumentation
#go.
Why is Go 1.22's enhanced routing not working for me? (2 mins read).
Why you may be receiving 404 page not found
errors when using Go's new enhanced routing in Go 1.22.
by Jamie Tanna
.
#blogumentation
#go.
Creating a quick CLI in Go is easy, but here are some patterns you can use to make your CLI easier to extend in the future
by Jamie Tanna
.
#go
#command-line.
Make the compiler check your assumptions before any code runs.
by Jamie Tanna
.
#go.
A Go tool to auto generate methods for your enums. Contribute to dmarkham/enumer development by creating an account on GitHub.
by Jamie Tanna
.
#go.
Go first came onto my radar about 9 years ago when I came across MuMax during my PhD studies. While I’ve touched it briefly, I wouldn’t consider myself to have used it in anger until recently, when I started a job that uses it as one of it’s primary languages for API development. I’ve had experience in writing C and C++ code, but more recently I’ve done a lot of Python, so going back to Go has felt oddly like a throwback to those compiled languages I’ve used before, with a bit of modern sparkle.
by Jamie Tanna
.
#go.
It may seem silly, but go run is my favorite part about go. Want to run your code? go run main.go. It is so stupidly simple that I could tell my mom about this command, and she would immediately understand. Like with most things in go, the real power in this command is in the effortless understanding of how to build and run everyone’s code. But I can run node main.
by Jamie Tanna
.
#go.
Gotcha: Don't try and authenticate to URLs generated by GitHub Actions Artifacts v4 (3 mins read).
Why you may be receiving errors when trying to authenticate to download GitHub Actions Artifacts using the v4 Actions.
In response to @cadey@pony.social's blog post about wanting retry loops in #Golang, I wrote terrible hack using using the proposed iterator syntax. https://go.dev/play/?v=gotip var err error for range backoff(&err, 1 * time.Second) { if err = something1(); err != nil { continue } if err = something2() ; err != nil { continue } }
by Jamie Tanna
.
#go.
I wish Go had a retry block https://xeiaso.net/blog/2024/retry-block/
by Jamie Tanna
.
#go.
Mat Ryer, principal engineer at Grafana Labs and host of the Go Time podcast, shares what he's learned from more than a dozen years of writing HTTP services in Go.
by Jamie Tanna
.
#go.
Mat Ryer, principal engineer at Grafana Labs and host of the Go Time podcast, shares what he's learned from more than a dozen years of writing HTTP services in Go.
by Jamie Tanna
.
#go.
Mat Ryer has been writing Go since r59—a pre `1.0` release—and has been building HTTP APIs and services in Go for the past eight years. He shares his experience and insights.
by Jamie Tanna
.
#go.
I strive to respect everybody’s personal preferences, so I usually steer clear of debates about which is the best programming language, text editor or operating system. However, recently I was asked a couple of times why I like and use a lot of Go, so here is a coherent article to fill in the blanks of my ad-hoc in-person ramblings :-).
by Jamie Tanna
.
#go.
How to unpublish/redact/undo/retract a Go release (3 mins read).
How to retract a release version of a Go version, without risking folks automagically upgrade to that version.
by Jamie Tanna
.
#blogumentation
#go.
How do you represent a JSON field in Go that could be absent, null
or have a value? (5 mins read).
Why it's surprisingly hard to work out a field has been sent or whether it's explicitly null, when using Go's encoding/json
.
Isolated loop variables, range over integers, math/rand v2 and enhanced routing.
by Jamie Tanna
.
#go.
Golang plugin system over RPC. Contribute to hashicorp/go-plugin development by creating an account on GitHub.
by Jamie Tanna
.
#go.
Debug-level logging for developers (only!). Contribute to appliedgocode/what development by creating an account on GitHub.
by Jamie Tanna
.
#go.
A tool to generate Go data types from JSON Schema definitions. - GitHub - omissis/go-jsonschema: A tool to generate Go data types from JSON Schema definitions.
by Jamie Tanna
.
#go
#json-schema.
🦩 Tools for Go projects. Contribute to nikolaydubina/go-recipes development by creating an account on GitHub.
by Jamie Tanna
.
#go.
A simple, powerful library for forms and prompts in the terminal 🤷🏻♀️ - GitHub - charmbracelet/huh: A simple, powerful library for forms and prompts in the terminal 🤷🏻♀️
by Jamie Tanna
.
#go.
by Jamie Tanna
.
#github
#oauth2
#go.
Automatically generate Go test boilerplate from your source code. - GitHub - cweill/gotests: Automatically generate Go test boilerplate from your source code.
by Jamie Tanna
.
#go.
The Golang linter that checks usage of github.com/stretchr/testify. - GitHub - Antonboom/testifylint: The Golang linter that checks usage of github.com/stretchr/testify.
by Jamie Tanna
.
#go.
Today, if you publish a popular Go module on a URL and you lose control of the URL (through, eg, domain expiration and having the domain snatched up), you have a problem that's probably more or less impossible to deal with short of making blog/Fediverse/etc posts about the situation. Go module identity is tied to URLs with more or less no external override or way to automatically announce and see problems (individual people can override for their usage, but that doesn't scale).
by Jamie Tanna
.
#go.