Next Release Notes Draft

DRAFT RELEASE NOTES — Introduction to Go 1.28

Go 1.28 is not yet released. These are work-in-progress release notes. Go 1.28 is expected to be released in February 2027.

Tools

Vet

The new scannererr analyzer checks for failure to handle scanner errors after a loop around bufio.Scanner.Scan, which may cause scanning or I/O errors to go unreported.

The sqlrowserr analyzer performs a similar check for loops around sql.Rows.Next, so that iteration errors are correctly distinguished from a smaller result.

Bootstrap

As mentioned in the Go 1.26 release notes, Go 1.28 now requires Go 1.26.0 or later for bootstrap. We expect that Go 1.30 will require a minor release of Go 1.28.0 or later for bootstrap.

Standard library

Minor changes to the library

embed

The ReadAt methods of files returned by embed.FS now return io.EOF when called with an offset at or beyond the end of the file, as required by io.ReaderAt.

encoding/base32

Encoding.EncodedLen now panics if the encoded length overflows int, rather than returning a negative number.

encoding/base64

Encoding.EncodedLen now panics if the encoded length overflows int, rather than returning a negative number.

flag

The new FlagSet.All method returns an iterator over all the flags in the FlagSet; the function All does the same for the global CommandLine flag set. The new Flag.IsSet field indicates whether the flag has been set.

go/parser

The ResolveFile function performs legacy syntactic identifier resolution on an ast.File syntax tree. This resolution is deprecated; new applications should instead use go/types. This function is provided to ease the transition away from the old resolution in applications that mostly parse files in SkipObjectResolution mode but later encounter some cases where the old resolution is needed.

net

The IPMask, IPNet, and HardwareAddr types each now implement a encoding.TextUnmarshaler method. This method will recognize the current marshaling of those types, as well as a planned future marshaling format. The future marshaling format will be readable in JSON format, unlike the current format which is a base64 encoding. The future marshaling format will become the default in a later Go release. This is being done as a two-step process so that JSON generated by this release of Go can still be read by earlier releases of Go.

net/http

The long-deprecated Transport.CancelRequest now does nothing. Use NewRequestWithContext (available since Go 1.13) to create a cancellable request.

ProxyFromEnvironment now prioritizes lowercase proxy environment variables (http_proxy, https_proxy, and no_proxy) over the uppercase versions if both are set to different values. This change also affects default proxy lookups in DefaultTransport and DefaultClient by extension.

The new MethodQuery constant represents the HTTP QUERY method defined in RFC 10008.

net/url

The new MustParse function returns the parsed URL or panics on error. It can simplify some common uses of Parse. For instance, initializing variables with valid URL string constants.

syscall

On Linux, SysProcAttr now supports enforcement of Landlock policies and the PR_SET_NO_NEW_PRIVS flag for newly spawned subprocesses.

testing/fstest

The ReadAt methods of files returned by testing/fstest.MapFile.Open now return io.EOF when called with an offset at or beyond the end of the file, as required by io.ReaderAt.

testing/synctest

The new Subtest convenience function combines [testing.(*T).Run] and testing/synctest.Test.