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

ScienceDaily/Minimalist lamp/Avocado tip

Sunday, December 22, 2024

Recomendo - issue #442 ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

Laravel VS Code Extension, Laravel 11.36, Wirechat, and more! - №544

Sunday, December 22, 2024

Your Laravel week in review ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

Kotlin Weekly #438

Sunday, December 22, 2024

ISSUE #438 22nd of December 2024 Announcements klibs.io JetBrains has introduced the alpha version of klibs.io – a web service that speeds up and simplifies discovering KMP libraries that best meet

Weekend Reading — Happy "That's a January Problem" week

Saturday, December 21, 2024

Can Christmas season start a little earlier this year Tech Stuff Ramsey Nasser fuck it happened i am in a situation where i do actually need to reverse a linked list Atuin I just learned about Atuin

Daily Coding Problem: Problem #1644 [Easy]

Saturday, December 21, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by IBM. Given an integer, find the next permutation of it in absolute order. For example,

🐧 Whatever Happened to Unix Workstations? — My Incredibly Cheap Alternative to a Soundbar

Saturday, December 21, 2024

Also: Here's Why More Games Need Expanded Difficulty Settings How-To Geek Logo December 21, 2024 Did You Know Lake Wendouree, an artificially created and maintained shallow urban lake in Australia,

Supercharge Your Knowledge Capture Workflow with the Obsidian Web Clipper

Saturday, December 21, 2024

Stop juggling multiple tools and supercharge your knowledge capture workflow with Obsidian's powerful Web Clipper browser extension Sébastien Dubois DeveloPassion's Newsletter Supercharge Your

Charted | The World's Most Valuable Automakers 🚙

Saturday, December 21, 2024

Tesla shares reached a record high, setting a new valuation milestone. This graphic highlights the world's most valuable automakers by market cap. View Online | Subscribe | Download Our App

Next Holiday Season, Ignore Everyone Except One Customer

Saturday, December 21, 2024

Top Tech Content sent at Noon! Boost Your Article on HackerNoon for $159.99! Read this email in your browser How are you, @newsletterest1? 🪐 What's happening in tech today, December 21, 2024? The

🐍 New Python tutorials on Real Python

Saturday, December 21, 2024

Hey there, There's always something going on over at Real Python as far as Python tutorials go. Here's what you may have missed this past week: 🎓 Master Python's Core Principles (New Live