random thoughts — a journey to somewhere
Structured Logging in Go with log/slog
Getting started with log/slog, Go 1.21's standard-library structured logger — levels, handlers, wrapping the logger, writing to a file, and go vet gotchas. Read more 14 Sep 2023 - 4 minute read
Trace Logging in Golang
Add a TRACE log level to a Go program to observe code execution paths, using runtime caller info to report the file and line that logged. Read more 20 Aug 2023 - 2 minute read
Signal Handling and Graceful Shutdown in Go
Catch SIGINT and SIGTERM in Go, broadcast the shutdown to every goroutine, unblock blocking calls and shut down an HTTP server cleanly. Read more 11 Mar 2023 - 15 minute read
Working with SSH in Linux and macOS
Generate SSH keys, load them into ssh-agent, set up password-less login, clean up known_hosts and tame your ~/.ssh/config on Linux and macOS. Read more 22 Dec 2022 - 7 minute read
Symmetric Encryption with ChaCha20-Poly1305 in Go
A practical guide to authenticated symmetric encryption in Go using ChaCha20-Poly1305 — keys, nonces, where to store them, and full working code. Read more 14 Jul 2022 - 6 minute read

