#​491 — January 16, 2024

Unsub  |  Web Version

Together with  Dragonfly

Go Weekly

Initial Thoughts on Go 1.22 — 1.22 is due next month, but the release candidate gives us a look at plenty of changes and improvements coming down the pike, including new default behavior for loop variables in for loops, the ‘rangefunc’ experiment (more on that next), and even some performance improvements.

Jason Fulghum (DoltHub)

The Rangefunc Experiment — The Go team is investigating the addition of range-over function iterators to Go, with 1.22 getting a preliminary implementation behind an environment variable. They want feedback on how it works and this page shows off the detail. (You’ll need the 1.22 RC or later to try this now.)

The Go Wiki

Redis With Wings — Dragonfly is a simple, performant, and cost-efficient in-memory data store, perfect as a cache or database for your high-performance Go apps. Dragonfly is fully compatible with Redis APIs but without the Redis management complexity.

Dragonfly sponsor

What’s New in Go 1.22: reflect.TypeFor — Carlana continues our train of Go 1.22 items with a look behind the scenes of the implementation of reflect.TypeFor, which she worked on.

Carlana Johnson


How Do You Represent a JSON Field That Could Be Absent, null or Have a Value? — Why it’s surprisingly hard to work out if a field has been sent or whether it’s explicitly null when using encoding/json, plus a new library to help with the problem.

Jamie Tanna

Using React with templ in Go — A tutorial on how to incorporate React’s rich ecosystem of components as 'islands of interactivity' embedded within the server-side rendering capabilities of Go and templ.

Adrian Hesketh

'Sign in with Google' in Go — A quick look at implementing a ‘Sign-in with Google’ authentication method for your app.

Eli Bendersky

▶  Memory Management in Go: The Good, the Bad and the Ugly — Stays reasonably high-level and accessible.
Liam Hampton

Go Test Doubles by Example
Amin Rashidbeigi

🛠 Code & Tools

Gotraceui: GUI Frontend for Go Execution Traces — Meant to be a faster, more accessible, and more powerful alternative to go tool trace with a Gio UI-powered interface tuned specifically to the unique characteristics of Go traces. Now with added flame graphs 🔥 GitHub repo.

Dominik Honnef

Try a Lightning-Fast Pairing Tool Built with You in Mind — Tuple will change the way you think about pair programming. Try it with your team free for 14 days, no card required.

Tuple sponsor

Avo 0.6: Generate x86 Assembly with Go — Makes assembly easier to write by way of Go control structures and virtual registers. An example of adding two numbers shows off how it works in a simple way. v0.6 adds support for more AVX instructions and improves Go 1.20+ support.

Michael McLoughlin

Algnhsa 1.1: AWS Lambda net/http Server Adapter — Run Go webapps serverlessly on AWS Lambda with API Gateway or ALB without changing existing HTTP handlers.

Artem Krylysov

Harmony: A 'Peaceful' Module for Using Discord's API — When I first linked this years ago, I wrote Discord is a popular chat app, particularly in gaming communities.” Imagine needing to be told that nowadays.. 😆

Antoine Couchard

📰 Classifieds

🪝 Receive, authenticate, transform, filter, route, and deliver webhooks with the Hookdeck Event Gateway. Try the receiving webhooks quickstart.

🗓️ GopherCon Europe is taking place this February (next month!) and June in Athens, Greece and Berlin, Germany respectively. Ardan Labs is also running some Go workshops at the event in Greece.

Steampipe: Query Cloud Services with SQL — Use SQL to query and even join across over 100 APIs from providers like Airtable, AWS, Heroku, Slack and Stripe, as well as social media sites like Reddit and Hacker News.