Go

  • Evolving the Go Standard Library with math/rand/v2

    Since Go 1 was released in March 2012, changes to the standard library have been constrained by Go’s compatibility promise. Overall, compatibility has been a boon for Go users, providing a stable base for production systems, documentation, tutorials, books, and more. Over time, however, we’ve realized mistakes in the original APIs that cannot be fixed compatibly; in…

    Read more

  • More Powerful Go Execution Traces

    The runtime/trace package contains a powerful tool for understanding and troubleshooting Go programs. The functionality within allows one to produce a trace of each goroutine’s execution over some time period. With the go tool trace command (or the excellent open source gotraceui tool), one may then visualize and explore the data within these traces. The magic of a trace is that…

    Read more

  • Robust Generic Functions On Slices

    The slices package provides functions that work for slices of any type. In this blog post we’ll discuss how you can use these functions more effectively by understanding how slices are represented in memory and how that affects the garbage collector, and we’ll cover how we recently adjusted these functions to make them less surprising. With Type parameters we…

    Read more

  • Go 1.22 Is Released!

    Today the Go team is thrilled to release Go 1.22, which you can get by visiting the download page. Go 1.22 comes with several important new features and improvements. Here are some of the notable changes; for the full list, refer to the release notes. Language changes The long-standing “for” loop gotcha with accidental sharing of loop…

    Read more