Next Release Notes Draft

DRAFT RELEASE NOTES — Introduction to Go 1.N

Go 1.25 is not yet released. These are work-in-progress release notes. Go 1.25 is expected to be released in August 2025.

Tools

Go command

The go build -asan option now defaults to doing leak detection at program exit. This will report an error if memory allocated by C is not freed and is not referenced by any other memory allocated by either C or Go. These new error reports may be disabled by setting ASAN_OPTIONS=detect_leaks=0 in the environment when running the program.

When the go command updates the go line in a go.mod or go.work file, it no longer adds a toolchain line specifying the command’s current version.

Runtime

The message printed when a program exits due to an unhandled panic that was recovered and re-raised no longer repeats the text of the panic value.

Previously, a program which panicked with panic("PANIC"), recovered the panic, and then re-panicked with the original value would print:

panic: PANIC [recovered]
  panic: PANIC

This program will now print:

panic: PANIC [recovered, reraised]

On Linux systems with kernel support for anonymous VMA names (CONFIG_ANON_VMA_NAME), the Go runtime will annotate anonymous memory mappings with context about their purpose. e.g., [anon: Go: heap] for heap memory. This can be disabled with the GODEBUG setting decoratemappings=0.

Compiler

The compiler and linker in Go 1.25 now generate debug information using DWARF version 5; the newer DWARF version reduces the space required for debuging information in Go binaries. DWARF 5 generation is gated by the “dwarf5” GOEXPERIMENT; this functionality can be disabled (for now) using GOEXPERIMENT=nodwarf5.

Standard library

Minor changes to the library

archive/tar

The *Writer.AddFS implementation now supports symbolic links for filesystems that implement io/fs.ReadLinkFS.

crypto/elliptic

The hidden and undocumented Inverse and CombinedMult methods on some Curve implementations have been removed.

crypto/tls

The new ConnectionState.CurveID field exposes the key exchange mechanism used to establish the connection.

When FIPS 140-3 mode is enabled, Extended Master Secret is now required in TLS 1.2.

go/parser

The ParseDir function is deprecated.

io/fs

A new ReadLinkFS interface provides the ability to read symbolic links in a filesystem.

mime/multipart

The new helper function FieldContentDisposition builds multipart Content-Disposition header fields.

net

LookupMX and [(*Resolver).LookupMX] now return DNS names that look like valid IP address, as well as valid domain names. Previously if a name server returned an IP address as a DNS name, LookupMX would discard it, as required by the RFCs. However, name servers in practice do sometimes return IP addresses.

os

The filesystem returned by DirFS implements the new io/fs.ReadLinkFS interface. CopyFS supports symlinks when copying filesystems that implement io/fs.ReadLinkFS.

The os.Root type supports the following additional methods:

testing/fstest

MapFS implements the new io/fs.ReadLinkFS interface. TestFS will verify the functionality of the io/fs.ReadLinkFS interface if implemented. TestFS will no longer follow symlinks to avoid unbounded recursion.