Urgent.News

One page, thousands of outlets. See who else covered it.

Editions

Tech

Go 1.27 Release Notes

Interactive tour of go 1.27 https://victoriametrics.com/blog/go-1-27 Comments

The Go 1.27 release arrives in August 2026, six months after Go 1.26. Most changes focus on toolchain, runtime, and libraries, preserving the Go 1 promise of compatibility.

A major addition allows generic methods, enabling method declarations to declare their own type parameters. This lets adding generic functions within a particular data type namespace, previously requiring full package scope.

Interface methods may not declare type parameters nor be implemented by generic methods. In struct literals, a key can now be any valid field selector for the struct type. Function type inference now applies to all contexts where a generic function is assigned to a variable or converted to a matching function type.

The go command no longer supports the bzr version control system, dropping direct module fetching from bzr servers. It now recognizes a GODEBUG setting if present in go.mod files or .go source files, failing if set to an old value.

go test now invokes the stdversion vet check by default, flagging use of standard library symbols too new for the Go version in force. go test -json now annotates output lines with OutputType, taking values like "error", "error-continue", or "frame".

The go doc command now supports package@version syntax and accepts -ex to list executable examples. When an example name is passed, go doc prints the example source code and comments.

go fix contains several new modernizers, including atomictypes, embedlit, slicesbackward, and unsafefuncs, while removing the existing fmtappendf analyzer. Waitgroup analyzer was renamed to avoid ambiguity. go mod tidy now automatically merges duplicate require blocks in modules specifying Go 1.27 or later, ensuring a clean structure with two blocks: direct and indirect dependencies.

go tool trace’s -http option now restricts the listen address to localhost, consistent with go tool pprof’s -http flag. Tracebacks for modules with Go 1.27 or later directives include runtime/pprof goroutine labels in the header line. The asynctimerchan GODEBUG setting has been permanently removed. Channels created by package time are now always unbuffered, regardless of GODEBUG settings.

The compiler generates calls to size-specialized memory allocation routines, reducing the cost of small memory allocations by up to 30%. This increases binary size by ~60KB in real allocation-heavy programs. Users can opt-out with GOEXPERIMENT=nosizespecializedmalloc. A new profile type is also introduced.

Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at go.dev →

More in Tech

More from Wednesday 19 August →