The Go team has released Go 1.27, the latest major update to the popular open-source programming language, six months after Go 1.26. As usual, the release maintains the Go 1 compatibility promise, so almost all existing Go programs should continue to compile and run without changes.
Arguably the biggest language-level change in Go 1.27 is support for generic methods. Method declarations can now introduce their own type parameters, allowing generic functionality to live directly within the namespace of a particular data type instead of requiring developers to declare a package-level generic function.
Function type inference has also been generalized so that it applies in all contexts where a generic function is assigned or converted to a matching function type.
Go 1.27 also brings a noteworthy runtime optimization. The compiler now generates calls to size-specialized allocation routines, reducing the cost of some memory allocations smaller than 80 bytes by up to 30%. The exact benefit depends on the workload, and the Go team estimates an overall improvement of about 1% in real-world allocation-heavy applications.
Another runtime improvement is the general availability of the goroutineleak profile, which first appeared experimentally in Go 1.26. Available through runtime/pprof and the /debug/pprof/goroutineleak HTTP endpoint, it is designed to identify goroutines that are permanently blocked on concurrency primitives such as channels, mutexes, and condition variables.
At the same time, the standard library receives one of its largest changes with the introduction of encoding/json/v2 and encoding/json/jsontext. The former is a substantial revision of Go’s existing JSON package, while jsontext provides lower-level syntactic JSON processing through encoders and decoders operating on tokens and values.
JSON v2 adopts stricter defaults, rejecting invalid UTF-8 strings and duplicate object member names. Importantly, existing applications are not forced onto the new API. The familiar encoding/json package remains supported but is now backed by the v2 implementation while preserving its existing marshaling and unmarshaling behavior.
Regarding cryptography, a new crypto/mldsa package implements the ML-DSA post-quantum digital signature scheme standardized in FIPS 204. At the same time, crypto/x509 gains support for ML-DSA public keys, private keys, and signatures, while TLS 1.3 can now use ML-DSA signatures through the new MLDSA44, MLDSA65, and MLDSA87 signature schemes.
Go 1.27 also introduces a new uuid package in the standard library for generating and parsing UUIDs, reducing the need to reach for an external dependency for this common task.
On the performance side, the release debuts an experimental simd package that provides portable, vector-size-agnostic SIMD operations. When supported by the system, it uses hardware vector instructions while exposing portable vector types such as Int8s and Float32s. The feature is opt-in and must be enabled at build time with GOEXPERIMENT=simd.
There are many improvements across Go’s command-line tooling as well. go test now runs the stdversion vet check by default, helping catch uses of standard-library APIs newer than the Go version declared by the module.
For projects using Go 1.27 or newer, go mod tidy now automatically consolidates duplicate require sections into at most two blocks (one for direct dependencies and one for indirect dependencies) while preserving comments. Several additional modernizers have also landed in go fix.
The HTTP stack receives several refinements: Go’s HTTP/2 server can now honor RFC 9218 client priority signals, while HTTP/1 response bodies automatically drain a limited amount of unread data when closed to improve connection reuse. Servers can also use the new MaxHeaderValueCount field to limit the number of accepted header values.
Unicode support has jumped from Unicode 15 to Unicode 17, covering the changes introduced in both Unicode 16 and 17.
Finally, platform requirements change for macOS users. As previously announced, Go 1.27 now requires macOS 13 Ventura or newer. On Linux’s 64-bit big-endian PowerPC port, the toolchain switches to the ELFv2 ABI and adds support for cgo, position-independent executables, and external linking.
For more details, see the official announcement or the release notes.
