Go structured logging with slog

Before the release of version 1.21, you couldn’t set levels for your log messages in Go without either using third-party libraries or writing your own boilerplates. Coming from Python, I’ve always found this odd, considering that this capability has been in the Python...

What I worked on for Go 1.21

Go 1.21 has been released! For past releases, I wrote up my notes on what’s new in Go 1.18 (part 1, part 2), 1.19, and 1.20 (part 1, part 2, part 3), but I thought I would sit this round of blogging out, in part because there have been some good roundups of what’s new elsewhe...

Go structured logging with slog

Before the release of version 1.21, you couldn’t set levels for your log messages in Go without either using third-party libraries or writing your own boilerplates. Coming from Python, I’ve always found this odd, considering that this capability has been in the Python...

Go structured logging with slog

Before the release of version 1.21, you couldn’t set levels for your log messages in Go without either using third-party libraries or writing your own boilerplates. Coming from Python, I’ve always found this odd, considering that this capability has been in the Python...

Go structured logging with slog

Master Go 1.21's log/slog package for structured logging with levels, JSON output, and attribute grouping. No third-party libraries needed.

Programs shouldn't commit to fixed and predictable log messages

Announcing GoReleaser v1.20 — a quality-of-life release

A little over 100 commits in small-ish quality-of-life improvements.

Go 1.21 is released!

Go 1.21 brings language improvements, new standard library packages, PGO GA, backward and forward compatibility in the toolchain and faster builds.

Go 1.21 released

#​472 — August 8, 2023 Unsub  |  Web Version ⛱ I'm taking two weeks off and will be back on Tuesday, August 29. So if you don't see the newsletter turn up for a while, rest assured it's not your fault ;-) You're welcome to hit reply and send in things...

Name before type: why 'age int' is better than 'int age'

A variable's name is more important than its type, so the name should be more prominent and come first in declarations.