Go 1.26: What's New
Go 1.26 shipped in February 2026, six months after Go 1.25, keeping the Go 1 compatibility promise. Here's what stands out.
Language changes
new() now accepts expressions, not just types, to set an initial value:
type Person struct {
Name string `json:"name"`
Age *int `json:"age"`
}
p := Person{Age: new(yearsSince(born))}
Self-referential generic constraints are now allowed — a generic type can reference itself in its own type parameter:
type Adder[A Adder[A]] interface {
Add(A) A
}
func algo[A Adder[A]](x, y A) A {
return x.Add(y)
}
Tooling
go fixwas rewritten around "modernizers" — dozens of fixers that update code to modern Go idioms/APIs — plus a source-level inliner driven by//go:fix inlinedirectives.go mod initnow defaults to a lowergoversion ingo.mod(Go 1.26 writesgo 1.25.0).cmd/doc/go tool docare gone — usego doc.pprof's web UI now defaults to the flame graph view.
Runtime
- Green Tea garbage collector is on by default (experimental in 1.25) —
10–40% less GC overhead, with an extra ~10% on newer CPUs (Intel Ice Lake,
AMD Zen 4+). Opt out with
GOEXPERIMENT=nogreenteagc. - cgo calls are ~30% cheaper at baseline.
- Heap base address randomization on 64-bit platforms, a security
hardening measure (
GOEXPERIMENT=norandomizedheapbase64to disable). - An experimental goroutine leak profile (
runtime/pprof, enabled viaGOEXPERIMENT=goroutineleakprofile) flags goroutines blocked on unreachable concurrency primitives, exposed at/debug/pprof/goroutineleak.
Standard library
Two new packages: crypto/hpke (RFC 9180 hybrid public-key encryption, with
post-quantum support) and the experimental simd/archsimd (SIMD on amd64).
A few changes worth knowing about:
| Package | What changed |
|---|---|
crypto/tls | Hybrid post-quantum key exchange on by default |
crypto/mlkem | ~18% faster encapsulation/decapsulation |
io.ReadAll | ~2x faster, ~50% less allocation |
bytes.Buffer | New Peek() method |
net | New Dialer.DialIP/DialTCP/DialUDP/DialUnix |
reflect | New iterator methods: Fields(), Methods(), Ins(), Outs() |
Platform notes
Go 1.26 is the last release supporting macOS 12 Monterey (Go 1.27 will require macOS 13+), and the Windows 32-bit ARM port is gone. Bootstrapping Go 1.26 itself requires Go 1.24.6 or later.
Full details: go.dev/doc/go1.26.