← All releases

go1.14.0

Major

February 25, 2020

Go 1.14 declares modules production-ready with new vendoring rules and flags, adds asynchronous goroutine preemption to fix scheduler/GC stalls in tight loops, and cuts defer overhead to near zero, alongside a language change allowing overlapping embedded interface methods.

highlights
  • Language: interfaces can now embed other interfaces with overlapping method sets (fixes diamond-embedding problems); explicitly declared methods must still be unique.

  • Modules: now considered production-ready; go command defaults to -mod=vendor when a top-level vendor dir exists and go.mod specifies go 1.14+, with new -mod=mod, -modfile, and -modcacherw flags.

  • New GOINSECURE environment variable to skip HTTPS/certificate validation for modules matching given glob patterns.

  • go get no longer silently upgrades to +incompatible major versions unless explicitly requested or already required.

  • Runtime: goroutines are now asynchronously preemptible, so call-free loops no longer stall the scheduler or delay GC; on Unix this means more syscalls fail with EINTR and must be retried.

  • defer performance improved to near-zero overhead versus a direct call, making it safe for performance-critical code.

  • Compiler adds -d=checkptr to dynamically check unsafe.Pointer rules, enabled by default with -race/-msan (except on Windows, where it's not recommended).

  • New hash/maphash package provides collision-resistant (non-cryptographic) hashing of byte sequences for building hash tables.

  • crypto/tls: SSLv3 support removed, TLS 1.3 can no longer be disabled via GODEBUG, and the package now auto-selects the best certificate when multiple chains are configured.

  • Platform changes: last release supporting macOS 10.11 and darwin/386; likely last for 32-bit darwin/arm (iOS/tvOS/watchOS); adds experimental linux/riscv64 and freebsd/arm64; drops Native Client (GOOS=nacl) support.

  • Windows: binaries now built with DEP enabled, and os.OpenFile/syscall.Open create files as read-only when the owner-write permission bit is unset.

  • testing package adds T.Cleanup/B.Cleanup for post-test cleanup functions, and go test -v now streams t.Log output as it happens instead of buffering until the end.