- Golang Nugget
- Posts
- Golang Nugget - Feb 3, 2025
Golang Nugget - Feb 3, 2025
Go 1.24's map has faster insertion and lookup but slower deletion due to the new Swiss Table-based implementation.
You Can Store That in a Container Registry?! — Did you know you can store more than Docker images in a Docker registry? You can store models and other artifacts in Docker registries, and ORAS can help with interacting with the registry. I got to know it when I was watching Siva’s talk at GopherCon.
Go Templator — Go templates are not type-safe inherently, and if the wrong data structure is passed, it throws an error at runtime. For example, if you pass a struct without the
Foo
field intoFoo value is: '{{ .Foo }}'
field, it returns an error at runtime (check the playground). To address this, Templator is a newly created repo that can enforce the use of templates in a type-safe way, allowing you to get compile-time errors rather than runtime errors.
The repo is also pointed in the tool-time 🙂Maps are faster in Go 1.24 — Go 1.24 is coming with many improvements, but one of the most interesting changes is the introduction of a Swiss Table-based map implementation. It improves performance for map operations.
This blog post explores what the Swiss Table implementation is, why it matters, and how it can impact your Go programs.
👻 Spoiler alert: insertion and lookup are faster, but deletion is slower.Go 1.24's go tool is one of the best additions to the ecosystem in years — Another great thing about Go 1.24 is the
tool
directive. It simplifies managing project dependencies by allowing to specify tools directly ingo.mod
file. If you’re about to update, this can improve your workflow and this post dive deep into it.Gist of Go: Context — This is another chapter of Anton’s Go Concurrency book, and in this chapter, he talks about Context. Needless to say, Context has been one of the coolest baked-in features of the stdlib, making it idiot-proof on how to handle cancellation, timeout, etc.
If you want to know more about Context package or refresh your knowledge, check out his post.
Writer RAG tool: build production-ready RAG apps in minutes
Writer RAG Tool: build production-ready RAG apps in minutes with simple API calls.
Knowledge Graph integration for intelligent data retrieval and AI-powered interactions.
Streamlined full-stack platform eliminates complex setups for scalable, accurate AI workflows.

Tool Time
github.com/lotusirous/go-concurrency-patterns — Collection of common concurrency patterns in Go. The repository includes various examples with playground links, such as the worker-pool and fan-in patterns.
github.com/bjesus/pipet — Pipet is a command-line-based web scraper. It supports three modes of operation: HTML parsing, JSON parsing, and client-side JavaScript evaluation. You can use Pipet to track a shipment, get notified when concert tickets are available, monitor stock price changes, and retrieve any other kind of information that appears online.
github.com/ebitengine/purego — Purego is a library for calling C functions from Go without Cgo. It’s still in beta and doesn’t support all data types, but it supports dynamic linking and lets you fall back to Cgo, meaning you can use it with Cgo, which can help with gradual porting.
github.com/mk6i/retro-aim-server — This is an instant messaging server that makes classic AIM and ICQ clients work again. I am not sure if anyone is going to have any usage for in in production, but I find these hacks fun when you get a chance to use a nostalgic app again, at least for fun.
github.com/alesr/templator — Go's built-in template package lacks type safety, which can lead to runtime errors when template data doesn't match what the template expects. Templator solves this by providing compile-time type checking for your templates.
P.S: The repo is still young, has 2 stars, and is in beta, but I feel it deserves recognition.
How did you like this edition?Or hit reply and share your thoughts! |
Reply