DRAFT RELEASE NOTES - Introduction to Go 1.13

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

As of Go 1.13, the go command by default downloads and authenticates modules using the Go module mirror and Go checksum database run by Google. See https://proxy.golang.org/privacy for privacy information about these services and the go command documentation for configuration details including how to disable the use of these servers or use different ones.

TODO

Changes to the language

TODO

Ports

TODO

Darwin

As announced in the Go 1.12 release notes, Go 1.13 now requires macOS 10.11 El Capitan or later; support for previous versions has been discontinued.

FreeBSD

As announced in the Go 1.12 release notes, Go 1.13 now requires FreeBSD 11.2 or later; support for previous versions has been discontinued. FreeBSD 12.0 or later requires a kernel with the COMPAT_FREEBSD11 option set (this is the default).

Tools

TODO

Runtime

TODO

Core library

TODO generally

TLS 1.3

TODO; link to Go 1.12 notes.

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.

TODO

all

TODO: https://golang.org/cl/174457: add new GOOS=illumos, split out of GOOS=solaris

bytes

TODO: https://golang.org/cl/161760: hoist error creation out of function

The new ToValidUTF8 function returns a copy of a given byte slice with each run of invalid UTF-8 byte sequences replaced by a given slice.

context

The formatting of contexts returned by WithValue no longer depends on fmt and will not stringify in the same way. Code that depends on the exact previous stringification might be affected.

crypto/ed25519

TODO: https://golang.org/cl/174945: promote from golang.org/x/crypto/ed25519

crypto/tls

TODO: https://golang.org/cl/177698: add support for Ed25519 certificates in TLS 1.2 and 1.3

database/sql

The new NullTime type represents a time.Time that may be null.

The new NullInt32 type represents an int32 that may be null.

debug/dwarf

TODO: https://golang.org/cl/158797: more graceful handling of unsupported types

html/template

When using a <script> tag with "module" set as the type attribute, code will now be interperted as JavaScript module script.

log

The new Writer function returns the output destination for the standard logger.

math/big

TODO: https://golang.org/cl/160682: implement Rat.SetUint64

TODO: https://golang.org/cl/168237: accept non-decimal floats with Rat.SetString

math/bits

TODO: https://golang.org/cl/178177: document that Add, Sub, Mul, RotateLeft, ReverseBytes are constant time

net

TODO: https://golang.org/cl/156366: use DNS over TCP when use-vc is set in resolv.conf

TODO: https://golang.org/cl/166297: use libSystem bindings for DNS resolution on macos if cgo is unavailable

TODO: https://golang.org/cl/170678: add KeepAlive field to ListenConfig

net/http

The new field Transport.ForceAttemptHTTP2 controls whether HTTP/2 is enabled when a non-zero Dial, DialTLS, or DialContext func or TLSClientConfig is provided.

When reusing HTTP/2, the Transport no longer performs unnecessary TLS handshakes.

TimeoutHandler's ResponseWriter now implements the Pusher and Flusher interfaces.

The new Server fields BaseContext and ConnContext allow finer control over the Context values provided to requests and connections.

The new Header method Clone returns a copy of the receiver.

os

The new UserConfigDir function returns the default directory to use for user-specific configuration data.

If a File is opened using the O_APPEND flag, its WriteAt method will always return an error.

os/exec

On Windows, the environment for a Cmd always inherits the %SYSTEMROOT% value of the parent process unless the Cmd.Env field includes an explicit value for it.

reflect

The new Value.IsZero method reports whether a Value is a zero value for its type.

The MakeFunc function now allows assignment conversions on returned values, instead of requiring exact type match. This is particularly useful when the type being returned is an interface type, but the value actually returned is a concrete value implementing that type.

runtime

Tracebacks, runtime.Caller, and runtime.Callers now refer to the function that initializes the global variables of PKG as PKG.init instead of PKG.init.ializers

runtime, internal/poll, net

TODO: https://golang.org/cl/166497: report event scanning error on read event

runtime/cgo

TODO: https://golang.org/cl/170127: look for android_get_device_api_level in libc.so

strings

The new ToValidUTF8 function returns a copy of a given string with each run of invalid UTF-8 byte sequences replaced by a given string.

sync

Large Pool no longer increase stop-the-world pause times.

Pool no longer needs to be completely repopulated after every GC. It now retains some objects across GCs, as opposed to releasing all objects, reducing load spikes for heavy users of Pool.

syscall

Uses of _getdirentries64 have been removed from Darwin builds, to allow binaries built with 1.12 to be uploaded to the macOS App Store.

The new ProcessAttributes and ThreadAttributes fields in SysProcAttr have been introduced for Windows, exposing security settings when creating new processes.

EINVAL is no longer returned in zero Chmod mode on Windows.

syscall/js

TypedArrayOf has been replaced by CopyBytesToGo and CopyBytesToJS for copying bytes between a byte slice and a Uint8Array.

testing

TODO: https://golang.org/cl/112155: stop rounding b.N

TODO: https://golang.org/cl/166717: add B.ReportMetric for custom benchmark metrics

TODO: https://golang.org/cl/173722: delay flag registration; move to an Init function

text/scanner

The new AllowNumberbars mode allows number literals to contain underbars as digit separators.

text/template

The new slice function returns the result of slicing its first argument by the following arguments.

time

Day-of-year is now supported by Format and Parse.

The new Duration methods Microseconds and Milliseconds return the duration as an integer count of their respectively named units.