DRAFT RELEASE NOTES — Introduction to Go 1.17

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

Changes to the language

TODO: complete this section

Ports

TODO: complete this section, or delete if not needed

Tools

TODO: complete this section, or delete if not needed

Go command

Modules

Module authors may deprecate a module by adding a // Deprecated: comment to go.mod, then tagging a new version. go get now prints a warning if a module needed to build packages named on the command line is deprecated. go list -m -u prints deprecations for all dependencies (use -f or -json to show the full message). The go command considers different major versions to be distinct modules, so this mechanism may be used, for example, to provide users with migration instructions for a new major version.

go get

The go get -insecure flag is deprecated and has been removed. To permit the use of insecure schemes when fetching dependencies, please use the GOINSECURE environment variable. The -insecure flag also bypassed module sum validation, use GOPRIVATE or GONOSUMDB if you need that functionality. See go help environment for details.

go.mod files missing go directives

If the main module's go.mod file does not contain a go directive and the go command cannot update the go.mod file, the go command now assumes go 1.11 instead of the current release. (go mod init has added go directives automatically since Go 1.12.)

If a module dependency lacks an explicit go.mod file, or its go.mod file does not contain a go directive, the go command now assumes go 1.16 for that dependency instead of the current release. (Dependencies developed in GOPATH mode may lack a go.mod file, and the vendor/modules.txt has to date never recorded the go versions indicated by dependencies' go.mod files.)

Runtime

TODO: complete this section, or delete if not needed

Compiler

TODO: complete this section, or delete if not needed

Linker

TODO: complete this section, or delete if not needed

Core library

TODO: complete this section

crypto/tls

(*Conn).HandshakeContext was added to allow the user to control cancellation of an in-progress TLS Handshake. The context provided is propagated into the ClientHelloInfo and CertificateRequestInfo structs and accessible through the new (*ClientHelloInfo).Context and (*CertificateRequestInfo).Context methods respectively. Canceling the context after the handshake has finished has no effect.

Cgo

The runtime/cgo package now provides a new facility that allows to turn any Go values to a safe representation that can be used to pass values between C and Go safely. See runtime/cgo.Handle for more information.

Minor changes to the library

As always, there are various minor changes and updates to the library, made with the Go 1 promise of compatibility in mind.

net/http

The net/http package now uses the new (*tls.Conn).HandshakeContext with the Request context when performing TLS handshakes in the client or server.

TODO: complete this section