← All releases

go1.15.0

Major

August 11, 2020

Go 1.15 has no language changes; it's mainly a toolchain and runtime release with a much faster, leaner linker, better small-object allocator performance, and tighter security defaults (X.509 CommonName, net/http parsing). Full Go 1 compatibility is maintained, so upgrading should be low-risk for most programs.

highlights
  • Linker substantially rewritten: ~20% faster, ~30% less memory for large ELF/amd64 builds; -buildmode=pie now links internally by default on linux/amd64 and linux/arm64

  • X.509 CommonName is no longer used as a fallback hostname when no SAN is present (restore old behavior with GODEBUG=x509ignoreCN=0)

  • New time/tzdata package (or build with -tags timetzdata) lets you embed the timezone database in the binary, adding ~800KB

  • GOPROXY now accepts comma- or pipe-separated proxy lists to control whether the go command falls back to the next proxy only on 404/410 or on any error

  • New GOMODCACHE environment variable lets you set the module cache location independently of GOPATH

  • vet now flags string(intVar) conversions (likely bugs) and impossible interface-to-interface type assertions, both enabled by default under go test

  • Small-object allocation performance improved significantly at high core counts; converting small integers to interfaces no longer allocates

  • go test -timeout changes now invalidate cached test results, so cached runs with a long timeout won't count as passing under a shorter one

  • crypto/tls adds a Dialer/DialContext, VerifyConnection callback, automatic session ticket key rotation, and enforces RFC 8446 downgrade protection

  • net/http request parsing hardened against smuggling: non-ASCII whitespace no longer trimmed and 'identity' Transfer-Encoding support dropped

  • net and os I/O deadline errors now wrap os.ErrDeadlineExceeded, and EINTR from system calls is now retried automatically instead of surfacing as an error

  • testing gains T.TempDir/B.TempDir for auto-cleaned temp directories, and TestMain no longer needs to call os.Exit explicitly