Golang Weekly - The one with Go 1.22 everywhere

Plus feeding a hungry mouse, why to start with the standard libraries, and how Mat Ryer writes Go HTTP services after all these years. |

#​495 — February 13, 2024

Unsub  |  Web Version

Together with  Ardan Labs

Go Weekly

Go 1.22 Released — Keeping in tradition with most even numbered Go releases landing in February, Go 1.22 is here! In theory, the upgrade is as simple as updating the version in go.mod (just be careful of any net/http.ServeMux breakages..) whereupon you'll be able to enjoy a variety of improvements:

  • Small performance improvements, though with larger potential gains through improvements to profile-guided optimization.
  • Variables defined in for loops are made anew on each iteration.
  • for loops may now range over integers.
  • range-over function iterators make an appearance, behind a flag for now.
  • Big enhancements to http/ServeMux and its routing abilities. Here's a quick comparison.
  • math/rand/v2 – the motivation was explained here.
  • A cute enhancement that stood out to me: "When io.Copy copies from a TCPConn to a UnixConn it will now use Linux's splice(2) system call if possible, using the new method TCPConn.WriteTo."

To go through everything, the full Go 1.22 release notes are the place to.. Go.

Eli Bendersky and the Go team

💡 We linked to it a month ago, but it's worth revisiting these interactive (unofficial) release notes for Go 1.22 by Anton Zhiyanov. It's a neat way to noodle with some of the new code features without leaving your browser.

Go! Experts at Your Service — 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

How I Write HTTP Services in Go After 13 Years — Mat Ryer, host of the Go Time podcast, wrote a post several years ago about how he wrote HTTP services after eight years of experience – now he's back for a thirteen year redux, covering what’s changed since 2018, and going into more depth overall.

Mat Ryer (Grafana Lab)

Reducing Go Dependencies — A case study of dependency reduction in Huma, a Go framework for creating HTTP REST APIs using OpenAPI, which might inspire you to consider similar options for your own projects.

Daniel Taylor

QUICK BITS:

Start with the Go Standard Library — Go has a great standard library, so "you should start with it", says Matthew. He also takes time to compare a few of the libraries against third party alternatives.

Matthew Sanabria

I Wish Go Had a retry Block“I kinda wish that Go had some kind of language-level construct for ‘an action that is composed of multiple parts that can fail, and when one fails in a non-permanent way, then the program will wait for some time before trying again’.”

Xe Iaso

WorkOS, the modern identity platform for B2B SaaS — WorkOS provides easy-to-use APIs for authentication, user identity, and complex enterprise features like SSO and SCIM.

WorkOS sponsor

jsonfile: A Quick Hack for Tinkering — Tailscale’s CTO has a bit of a thing for using JSON files as small scale, ad hoc databases. He explains why, the pros and cons, and shares an implementation in the form of jsonfile.go.

David Crawshaw

🐭🧀  Feeding a Hungry Mouse Using chromedp and Gochromedp is a package for remotely controlling a Chrome instance over its DevTools protocol. The developer in this post tried using it to automate the playing of a browser-based game.

Bhupesh Varshney

🛠 Code & Tools

gdu / go DiskUsage() 5.26.0: A Disk Usage Analyzer with a Terminal Interface — Written in Go, of course. This is a neat tool. Rapidly analyze your disk space usage – it benchmarks well against other tools in the space.

Daniel Milde

errcheck 1.7: It Checks That You Checked for Errors — Checking for errors is a fundamental part of the Go experience and this tool will help you check that you checked!

Kamil Kisiel

📰 Classifieds

🪝Hookdeck: A managed reliability & observability layer for webhooks & async messaging. Receive, transform, route, & deliver events at scale.

Wire 0.6.0: Compile-Time Dependency Injection for Go — Wire’s job is to simplify the management of initialization code when doing dependency injection. The first release in three years!

Google

sh 3.8: Shell Code Parser, Formatter, and Interpreter — Supporting sh, bash, and Korn/mksh formats. Now requires Go 1.21 at a minimum.

Daniel Martí

n

Older messages

'I don't scoff at 2% improvements'

Tuesday, February 6, 2024

Plus a brief history of dependency management in Go, and the Go survey is still open. | #​494 — February 6, 2024 Unsub | Web Version Together with Crunchydata Go Weekly Testing Out Profile-Guided

Go 1.22 Release Candidate 2

Tuesday, January 30, 2024

Plus the latest Go survey, the future of JSON in Go, and Mat Ryer serenades us with Go docs. | #​493 — January 30, 2024 Unsub | Web Version Together with Ardan Labs Go Weekly The Latest Go Developer

Russ Cox on Go changes

Tuesday, January 23, 2024

Plus optimizing compiler performance, and Rust vs Go redux. | #​492 — January 23, 2024 Unsub | Web Version Together with Ardan Labs Go Weekly Rust vs Go in 2024? — A perennially popular post from

A closer look at Go 1.22

Tuesday, January 16, 2024

Plus a GUI for execution traces, and finding harmony with Discord. | #​491 — January 16, 2024 Unsub | Web Version Together with Dragonfly Go Weekly Initial Thoughts on Go 1.22 — 1.22 is due next month,

Interactive examples of Go 1.22 features

Tuesday, January 9, 2024

Plus benchmarking Go SQLite libraries, fun with LLM embeddings, and a little bat and ball game. | #​490 — January 9, 2024 Unsub | Web Version Together with Ardan Labs Go Weekly Rob Pike: 'What We

You Might Also Like

WP Weekly 192 - WP Biz - Brands Merged, Woo Cart Popup, Fastest Hosting

Monday, May 6, 2024

Read on Website WP Weekly 192 / WP Biz The 'business of WordPress' is buzzing for sure, be it the acquisition of plugins or the massive Envato ownership change. Also, WordPress content brands

SRE Weekly Issue #423

Monday, May 6, 2024

View on sreweekly.com A message from our sponsor, FireHydrant: FireHydrant is now AI-powered for faster, smarter incidents! Power up your incidents with auto-generated real-time summaries,

⚠️ Avoiding AI Scams on Social Media — An Open Source Google Photos Alternative

Sunday, May 5, 2024

Also: Reviewing the Customizable Drop Mechanical Keyboard, and More! How-To Geek Logo May 5, 2024 📩 Get expert reviews, the hottest deals, how-to's, breaking news, and more delivered directly to

Daily Coding Problem: Problem #1432 [Medium]

Sunday, May 5, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This question was asked by Snapchat. Given the head to a singly linked list, where each node also has a “random”

PD#572 Good Ideas in Computer Science

Sunday, May 5, 2024

Ideas every programmer likes and why Garbage Collection and Object Oriented Programming don't count ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

RD#454 API Layer & Fetch Functions

Sunday, May 5, 2024

ixing API and UI code quickly leads to messy and unmaintainable code ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

The Shiny Toy Syndrome & Tiny macOS utility apps I love

Sunday, May 5, 2024

Lex launching its redesign, Raycast shares another monthly update packed with AI updates, prompts should be designed not engineered, and a lot more in this week's issue of Creativerly. Creativerly

Hyundai antes up $1B for AV startup Motional and Elon unplugs the Tesla Supercharger team

Sunday, May 5, 2024

Plus, layoffs come for Luminar, Fisker and Ola View this email online in your browser By Kirsten Korosec Sunday, May 5, 2024 Image Credits: Motional Welcome back to TechCrunch Mobility — your central

C#504 Adventures serializing absolutely everything in C#

Sunday, May 5, 2024

A fantastic journey porting Newtonsoft.Json to System.Text.Json ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Sunday Digest | Featuring 'Which City Has the Most Billionaires in 2024?' 📊

Sunday, May 5, 2024

Every visualization published this week, in one place. Visual Capitalist Sunday Digest logo May 5, 2024 | View Online | Subscribe | VC+ The Best of This Week's Visuals Presented by Voronoi: The