#448 — February 17, 2023 |
|
The Go Weekly Newsletter |
Purego: A Dynamic Way to Call C Functions from Go Without Cgo — No C means you can build for other platforms easily without a target C compiler/toolchain. No wrapper functions either. One of the contributors noted on HN: "It uses the same mechanisms that Cgo does to switch to the system stack and then call the C code. Purego just avoids having to need a C toolchain to cross compile code that calls into C from Go." Ebitengine |
Go Quirks and Intermediate Tricks — This isn’t the best formatted post, but you might pick up a few things from this list (which, handily, has code examples for each item). Efron Licht |
Free from O’Reilly: Build Resilient Apps in Go — Learn to build cloud-native, cost-effective, and fault-tolerant applications in this 3-chapter excerpt from O’Reilly’s Cloud Native Go. CockroachDB sponsor |
Rust vs Go in 2023 — A 2023-flavored update to a popular article first released in 2020. John is a fan of both Rust and Go and takes a careful look at where each independently makes the most sense. John Arundel |
🗣 Go May Add Telemetry Reporting That's On by Default — We featured the initial discussion behind this last week, but The Register has decided to run with the story and digested the public opinion a little more. Issues around ‘phoning home’ and privacy are always going to be fierce, but the intent, at least, appears to be good and as Nate Finch says “It’s just Go developers wanting to know how people use their software, so they can make it better. For you. For me. For all of us.” The Register |
IN BRIEF:
|
Structured Logging with slog — There is a language proposal to add slog to the standard library (GitHub discussion here.) slog has the basic features you’d expect. Still, not everyone is wild about how it handles attributes and custom loggers. Karan Sharma |
▶ ⬆️ Really Simple Structured Logging with Tracing
|
Building a URL Shortener using Go, SQLite and GORM — GORM is an ORM library for Go. Pratim Bhosale |
▶ Debugging Concurrent Programs in Go — The audio isn’t great but this is too useful not to link. Andrii Soldatenko |
▶ A Wacky Journey of Building a Vector Database in Go
|
🛠 Code & Tools |
go-pretty: Pretty Print Tables, Lists and Text on the Terminal — Utilities to prettify console output of tables, lists, progress-bars, text, etc. with a heavy emphasis on customization. Naveen Mahalingam |
gofumpt: A Stricter Daniel Martí |
Connect to Your Cloud Resources with Tailscale — Spend more time coding and less time troubleshooting with Tailscale. Now you can connect directly to cloud resources, containers, or VMs like they’re on your local network. Tailscale sponsor |
Go-Redis Now an Official Redis Client — A couple of weeks ago we mentioned Go-Redis v9 and how it had moved under the official Redis organization – now we get the full story. Igor Malinovskyi |
|
|
🎈 Up, up, and away. |
TinyGlobo: The TinyGo Powered Long Distance Balloon — It seems you don’t need to be a nation state agency to get in on the UFO action nowadays – you could just be a Go developer! Featuring a RP2040 programmed with TinyGo, this balloon sent back data using LoRaWAN long-range radio. ▶️ Here’s a video of the fun. Ron Evans |