Latest Pre-release in branch 1.27
1.27rc1
Released 18 Jun 2026
(2 days ago)
SoftwareGo
Version1.27
Status
RC
Latest release1.27rc1
18 Jun 2026
(2 days ago)
Release noteshttps://go.dev/doc/go1.27
Source codehttps://github.com/golang/go/tree/go1.27rc1
Documentationhttps://go.dev/doc/
Go 1.27 ReleasesView full list
Under Development: Go 1.27 is still in active development and has not been officially released. The features and changes described below are based on the current development branch and may change before the final release.

What Is New in Go 1.27

CategoryHighlights
New Features
  • Generic methods: a method declaration may now declare its own type parameters
  • New encoding/json/v2 and encoding/json/jsontext packages with stricter, more interoperable defaults
  • New crypto/mldsa package implementing the post-quantum ML-DSA signature scheme (FIPS 204)
  • New uuid package for generating and parsing UUIDs
  • Experimental simd and expanded simd/archsimd packages for portable and architecture-specific vector operations
  • crypto/tls support for MLKEM1024 and ML-DSA signature schemes in TLS 1.3
  • Response file (@file) parsing for compile, link, asm, cgo, cover, and pack tools
  • go doc supports package@version syntax and a new -ex flag
  • go fix adds new modernizers: atomictypes, embedlit, slicesbackward, unsafefuncs
  • New bytes.CutLast and strings.CutLast functions
  • New math/big Int.Divide method with multiple rounding modes
  • New hash/maphash.Hasher interface and ComparableHasher type
Improvements
  • Goroutine leak profiling (goroutineleak) is now generally available in runtime/pprof
  • Small memory allocations under 80 bytes are up to 30% cheaper via size-specialized allocation routines
  • Function type inference generalized to all contexts where a generic function is assigned to a matching function type
  • compress/flate compression speed is improved (encoded output may differ from 1.26)
  • HTTP/2 server now honors RFC 9218 client priority signals
  • net/http Response.Body auto-drains on close for better connection reuse
  • go mod tidy automatically merges duplicate require blocks in go.mod
  • Unicode support upgraded from Unicode 15 to Unicode 17
Bug Fixes
  • net.UnixConn read methods now return io.EOF directly instead of wrapping it in net.OpError
  • crypto/ecdsa PrivateKey.Sign now validates hash length when a non-nil SignerOpts is supplied
Breaking Changes
  • The go command drops support for the bzr version control system
  • Go 1.27 requires macOS 13 Ventura or later
  • Several GODEBUG settings are permanently removed: asynctimerchan, tlsunsafeekm, tlsrsakex, tls3des, tls10server, x509keypairleaf, and gotypesalias
  • time channels are now always unbuffered regardless of prior GODEBUG overrides
  • The fmtappendf go fix analyzer is removed; waitgroup is renamed to waitgroupgo
  • go tool trace -http now restricts the listen address to localhost when only a port is given
Deprecations
  • crypto/tls Config.Rand is deprecated in favor of testing/cryptotest.SetGlobalRandom for deterministic testing

What changes to generics does Go 1.27 introduce?

Go 1.27 lets a method declare its own type parameters, finally bringing generic methods to the language. In practice, this means you can attach a generic function to a specific type instead of declaring it at package scope just to get generics-like behavior on a single receiver.

type Container[T any] struct {
    items []T
}

func (c *Container[T]) Map[U any](f func(T) U) *Container[U] {
    out := &Container[U]{}
    for _, v := range c.items {
        out.items = append(out.items, f(v))
    }
    return out
}

Watch out for one constraint: interface methods still cannot declare type parameters, and generic methods cannot satisfy interface methods. This matters if you were hoping to build generic-method-based interfaces -- that path remains closed for now.

Two smaller language refinements ship alongside this. A struct literal key can now be any valid field selector, not just a top-level field name, which simplifies initializing nested structs. Function type inference is also generalized, so assigning a generic function to a variable of a matching function type now infers type arguments in more situations than before.

How does encoding/json/v2 change JSON handling in Go?

Go 1.27 ships encoding/json/v2 and encoding/json/jsontext as new packages, and critically, the existing encoding/json package is now backed by the v2 implementation under the hood. Most teams will not need to touch their import paths immediately, but the behavior underneath has changed.

  • encoding/json/v2 adds Marshal, MarshalWrite, MarshalEncode, Unmarshal, UnmarshalRead, and UnmarshalDecode, all accepting variadic Options
  • encoding/json/jsontext exposes a lower-level token and value model via Encoder and Decoder types
  • v2 defaults are stricter: invalid UTF-8 in strings is now rejected, and duplicate names in a JSON object are rejected

This matters if your codebase has historically tolerated malformed UTF-8 or duplicate keys, intentionally or not. Since v1 is now powered by v2 internals, error message text may shift even if you never touch the new API. Unmarshal performance is reported as significantly faster, while Marshal stays roughly at parity. If you hit a compatibility issue, you can fall back to the original implementation with GOEXPERIMENT=nojsonv2 at build time while the team works through the transition period.

What post-quantum cryptography support does Go 1.27 add?

Go 1.27 adds first-class support for ML-DSA, the FIPS 204 post-quantum signature scheme, through the new crypto/mldsa package. This matters if your organization has a post-quantum migration timeline, since Go now covers both key exchange and signatures with standardized primitives.

  • crypto/x509 can parse and work with ML-DSA private keys, public keys, and signatures
  • crypto/tls supports ML-DSA in TLS 1.3 through the new MLDSA44, MLDSA65, and MLDSA87 SignatureScheme values
  • The new MLDSAMu Hash value supports External Mu ML-DSA signing
  • MLKEM1024 is now available as a key exchange option via Config.CurvePreferences
cfg := &tls.Config{
    CurvePreferences: []tls.CurveID{tls.MLKEM1024, tls.X25519},
}

In practice, most teams will not need to flip any of this on by default, but if you operate in a regulated environment with post-quantum requirements, this release is the point where Go's standard library starts giving you production-ready building blocks instead of forcing third-party dependencies.

What runtime and performance improvements land in Go 1.27?

Go 1.27 reduces the cost of small memory allocations and graduates goroutine leak detection out of experimental status. Both changes are aimed squarely at production debugging and steady-state throughput.

The compiler now generates size-specialized allocation routines for allocations under 80 bytes, cutting their cost by up to 30 percent, with an expected ~1% improvement across real allocation-heavy programs. The tradeoff is roughly a 60 KB increase in binary size. If you see regressions, GOEXPERIMENT=nosizespecializedmalloc disables it at build time, though that opt-out is expected to be removed in Go 1.28.

The goroutineleak profile, experimental in Go 1.26, is now generally available through runtime/pprof and the /debug/pprof/goroutineleak endpoint in net/http/pprof. This matters if you have ever chased a slow memory or goroutine-count climb in production: the profiler detects goroutines blocked on concurrency primitives that are unreachable from any runnable goroutine, which covers a large class of real leaks.

import _ "net/http/pprof"

// then fetch:
// go tool pprof http://localhost:6060/debug/pprof/goroutineleak

Most teams should expect this profile to become a standard part of incident response tooling, similar to how the heap and goroutine profiles are used today.

What breaking changes should you plan for before upgrading to Go 1.27?

Go 1.27 removes a handful of long-deprecated GODEBUG escape hatches, so upgrade planning should focus on anything still relying on old TLS or build-tag behavior. asynctimerchan, tlsunsafeekm, tlsrsakex, tls3des, tls10server, x509keypairleaf, and gotypesalias are all permanently removed, meaning their pre-removal default behavior is now the only behavior.

To soften that blow, the go command now accepts these removed settings in go.mod godebug entries and //go:debug comments as long as they are set to the final value the setting had before removal. Setting them to an old, no-longer-supported value will fail the build instead of silently doing nothing.

  • The go command no longer fetches modules from bzr servers
  • macOS 13 Ventura is now the minimum supported macOS version
  • PowerPC 64-bit big-endian Linux binaries (GOOS=linux GOARCH=ppc64) now use the ELFv2 ABI, which requires Linux kernel 3.13 or later for cgo, PIE, and external linking
  • The fmtappendf go fix analyzer is removed, and waitgroup is renamed to waitgroupgo

This matters if your CI or build infrastructure still targets older macOS images or relies on internal linking assumptions for ppc64. Most teams running on Linux amd64 or arm64 will not notice any of this, but cross-compilation pipelines should be checked before the upgrade.

Frequently Asked Questions

Does upgrading to Go 1.27 require changes to existing code?
Most existing Go programs will continue to compile and run unchanged unless they rely on a GODEBUG setting that has been permanently removed, such as asynctimerchan or tlsrsakex, or target macOS versions older than 13.

Do I need to switch to encoding/json/v2 right away?
No, encoding/json continues to work and is not going away, though it is now backed internally by the v2 implementation, so unmarshal performance improves and some error message text may change even without touching the new API.

Is the simd package ready for production use in Go 1.27?
No, both simd and simd/archsimd remain experimental and require setting GOEXPERIMENT=simd at build time, and the API is not yet considered stable.

How do I enable goroutine leak detection in Go 1.27?
Import net/http/pprof and fetch the goroutineleak profile from the debug/pprof/goroutineleak endpoint, or call the equivalent function directly in the runtime/pprof package, since the feature is now generally available rather than gated behind an experiment flag.

Will my TLS configuration break after upgrading to Go 1.27?
Only if you were actively relying on legacy options like tls10server or tls3des to enable older TLS behavior, since those GODEBUG settings are permanently removed and the modern secure defaults now always apply.

Can I still build Go binaries for older macOS versions with Go 1.27?
No, Go 1.27 requires macOS 13 Ventura or later, and the toolchain no longer supports building or running on macOS 12 and earlier.

Releases In Branch 1.27

VersionRelease date
1.27rc118 Jun 2026
(2 days ago)