TGViewer
Go Go @golang · 19.2K subscribers
Post #154 36K
The standard library of Go 1.23 now includes the new unique package. The purpose behind this package is to enable the canonicalization of comparable values. In other words, this package lets you deduplicate values so that they point to a single, canonical, unique copy, while efficiently managing the canonical copies under the hood. You might be familiar with this concept already, called “interning”.

Let’s dive in to see how it works, and why it’s useful.

https://go.dev/blog/unique
go.dev New unique package - The Go Programming Language New package for interning in Go 1.23.
  • 🔥 82
  • 👍 43
  • ❤ 39
  • 👏 38
  • 👎 19
More from @golang
  1. Oct 1, 2026It's been a while... Everything is going agentic, so there is rather an interesting projec…
  2. Mar 20, 2026If you’re working with Go and care about performance, then check out the https://goperf.de…
  3. Jan 17, 2026Are Atomic Operations Faster and Better Than a Mutex? It Depends From the author: "Recentl…
  4. Nov 29, 2025Hello, folks, it's been a while. Re-sharing an interetsting recording from GopherCon 2025:…
  5. Aug 18, 2025Be Careful with Go Struct Embedding Embedding structs can quietly mask deeper-nested field…
  6. May 31, 2025What's new in Go: Google I/O presentation https://www.youtube.com/watch?v=kj80m-umOxs&ab_c…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →