---
title: "Go 1.22's improved HTTP routing capabilities"
publication: "Go Weekly"
issue: 480
published_at: "2023-10-17"
canonical_url: "https://golangweekly.com/issues/480"
---

Plus the Go-powered Linux distro, and Lip Gloss turns the tables. |        

#​480 — October 17, 2023 

[Unsub](https://golangweekly.com/leave/*|UID|*)|[Web Version](https://golangweekly.com/issues/480)  

Together with [![Ardan Labs\](https://res.cloudinary.com/cpress/image/upload/e_make_transparent/co_white,e_outline:7,q_auto/uf5bdgdgdbgcbdrzi6r7.png)](https://www.ardanlabs.com/consulting/?utm_source=cooperpress)  

Go Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/qav2a2wupfp5rz4lzfwu.jpg)](https://eli.thegreenplace.net/2023/better-http-server-routing-in-go-122/)  

[Better HTTP Server Routing in Go 1.22](https://eli.thegreenplace.net/2023/better-http-server-routing-in-go-122/) — Back in May, we linked to [a discussion](https://github.com/golang/go/discussions/60227) about enhancing `http.ServeMux`’s routing capabilities. In July, it [became a proposal](https://github.com/golang/go/issues/61410), and now Eli Bendersky gives a practical example of what the new multiplexer can offer and compares it against `gorilla/mux`. Hacker News hosted [an extensive discussion](https://news.ycombinator.com/item?id=37898999) too, with debate over the pros and cons of having a panic occur when multiple routes match and the use of magic strings vs. verb-specific methods. Go 1.22 is expected in early 2024, so expect to see more on this topic before then. 

Eli Bendersky   [![\](https://copm.s3.amazonaws.com/bcc68a3c.png)](https://www.ardanlabs.com/consulting/?utm_source=cooperpress) 

[Go! Experts at Your Service](https://www.ardanlabs.com/consulting/?utm_source=cooperpress) — Do you need help filling skill gaps, speeding up development & creating high performing software with Go, Docker, K8s, Terraform and Rust? We’ll help you maximize your architecture, structure, tech-debt and human capital. 

Ardan Labs Consulting sponsor   

[Why Gokrazy is Really Cool](https://xeiaso.net/blog/gokrazy/) — Did you know there’s a minimal, Go-focused Linux implementation targeting the Raspberry Pi? [gokrazy](https://gokrazy.org/) lets you deploy Go programs as ‘appliances’ on such devices (think something minimal like Alpine Linux but just for Go). 

Xe Iaso   

[Retries: An Interactive Study of Common Retry Methods](https://encore.dev/blog/retries) — A fantastic article packed with visual examples that explore different methods of retrying requests to show why some methods are better than others, concluding in some Go code implementing an ideal strategy. 

Sam Rose   

🚨 [Go 1.21.3 and 1.20.10 were released](https://groups.google.com/g/golang-announce/c/iNNxDTCjZvo/m/UDd7VKQuAAAJ). The main fix was for [a widely-discussed HTTP/2 vulnerability](https://cloud.google.com/blog/products/identity-security/how-it-works-the-novel-http2-rapid-reset-ddos-attack) where malicious clients could easily overwhelm HTTP/2 servers. 

👥 Garrit Franke demonstrates [how to organize multiple git identities](https://garrit.xyz/posts/2023-10-13-organizing-multiple-git-identities), perhaps as a way to maintain separation between work and personal use. 

🎤 The _Go Time_ podcast discussed [their experiences at GopherCon](https://changelog.com/gotime/293) which took place last month in San Diego. 

▶️ Popular Go YouTuber Anthony GG explained [how he structures his new Go projects](https://www.youtube.com/watch?v=dJIUxvfSg6A). 

🏢 The Go team has been maintaining [a collection of Go case studies](https://go.dev/solutions/case-studies) covering companies like American Express, Dropbox, Cloudflare, and Uber. 

📗 The [Go101.org books](https://go101.org/) have all been updated to Go 1.21 standards.  

🛠 Code & Tools 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/xqtda9aevpj72lhin88c.jpg)](https://github.com/charmbracelet/lipgloss/releases/tag/v0.9.0)   

[Lip Gloss 0.9: 'My, How the Tables Have Turned'](https://github.com/charmbracelet/lipgloss/releases/tag/v0.9.0) — _Lip Gloss_ provides a ‘fluent’-style API for stylizing text output from your programs, and has just added support for drawing _tables_ (see above). The release post (linked) helpfully includes a quick tutorial to creating your own tables. [GitHub repo](https://github.com/charmbracelet/lipgloss). 

Charm   

[Go OpenAI 1.16.0: Use OpenAI's APIs from Go](https://github.com/sashabaranov/go-openai) — Provides access to ChatGPT, GPT-3, GPT-4, DALL-E, Whisper, and OpenAI’s embeddings. They maintain [a nice collection of example uses](https://github.com/sashabaranov/go-openai#other-examples) in the README, and have just added one showing how to do semantic similarity comparisons between embeddings. 

Sasha Baranov       

📰 Classifieds   

🗣️ Introducing: Timeline view for your Temporal Workflows! [Learn more about visualizing Workflows in your own cluster, or in Temporal Cloud](https://t.mp/3Qf4d34). 

--- 

💻 Hired makes job hunting easy-instead of chasing recruiters, companies approach you with salary details up front. [Create a free profile now](https://hired.com/join/?utm_source=newsletter&utm_medium=sponsor&utm_campaign=%28b2c%29%28l-all%29%28r-all%29%28cooper-golangweekly%29&utm_content=find-your-next-job).      

▶[Gosh: Writing Go at the Command Line](https://www.youtube.com/watch?v=Lv41EtkdZdU) — _“I’ve written a tool called [gosh](https://github.com/nickwells/utilities/blob/master/gosh/_gosh.DOC.md) which I think fills a hole in the Go toolkit. Many languages offer a way to write code and execute it directly at the command line, Go doesn’t so I wrote gosh.”_ 

Nick Wells   

[`log/slog` `Handler` Interface to Correlate with OpenTelemetry Spans](https://github.com/remychantenay/slog-otel) — If you use both `slog` and OpenTelemetry, this may be for you. It adds various bits of information to the log record to assist in correlating against OTel[spans](https://opentelemetry.io/docs/concepts/signals/traces/#spans). 

Remy Chantenay   

[TruffleHog: Finds Leaked Credentials All Over The Place](https://github.com/trufflesecurity/trufflehog) — Much as pigs will hunt for truffles, this Go-powered ‘hog’ will work its way through git repos, S3, your file system, and elsewhere, looking for secrets and other such nuggets you might not want out in the wild. 

Truffle Security   

[Algernon: A Small Self-Contained Pure Go Web Server](https://github.com/xyproto/algernon) — With Lua, Markdown, HTTP/2, QUIC, Redis, MySQL and Postgres support. 

Alexander F. Rødseth   

- [Air 1.47](https://github.com/cosmtrek/air) – Live reloading for Go apps. (There's even [▶️ a screencast showing off](https://www.youtube.com/watch?v=erdDM_LmChs) how to use it and the benefits it provides.)
- [pgroll 0.3](https://github.com/xataio/pgroll/releases/tag/v0.3.0) – Zero-downtime, reversible schema migrations for Postgres.
- [GoCV 0.35](https://github.com/hybridgroup/gocv) – Bindings for the OpenCV 4 vision library.
- [Fiber 2.50.0](https://github.com/gofiber/fiber/releases/tag/v2.50.0) – Express.js-inspired Web framework for Go.
- [Mockery 2.36](https://github.com/vektra/mockery) – Generate mocks for interfaces.
- [Slogor](https://gitlab.com/greyxor/slogor) – An opinionated, colorful `slog` handler.
- [DynamiteMC](https://github.com/DynamiteMC/Dynamite) – Experimental Minecraft server implementation.
- [Official Go Stripe Library 76.0](https://github.com/stripe/stripe-go)         

Curated by Peter Cooper and [Glenn Goodrich](https://twitter.com/ruprict). 

[Change your email](https://golangweekly.com/edit_subscription/*|UID|*)
[Stop getting this newsletter](https://golangweekly.com/leave/*|UID|*) 

© Cooper Press Ltd · Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom
