Go 1.14: Module support in the go command is production-ready
Every six months, a new Golang release arrives. Go 1.14 is here and it includes some changes to the language, as well as improved defer performance and a more efficient page allocator. With 1.14, module support in the Go command is now officially ready for use in production. Users are now strongly encouraged to migrate to go modules.
On February 25, 2020 the Go team released the latest version of the language with Golang 1.14. This release arrives right on time, six months after 1.13 and continues to maintain Go version 1 compatibility.
It includes changes in the implementation of the toolchain, runtime, and libraries as well as some changes to the language and performance upgrades.
👩🏽🔬️Go 1.14 is released!
📝 Release notes: https://t.co/17ydG0OGym
— Go (@golang) February 25, 2020
Production-ready module support in the go command
With this release, module support in the
go command is now ready for use in production.
In the 1.14 announcement blog, the Go team recommends that with this update, all users should migrate
go modules for dependency management. Read about how to migrate to Go modules in your projects here.
SEE ALSO: How Curve is getting ahead with Golang
In order to migrate, your project must either be a new Go project, an established project with a non-modules dependency manager, or an established project without any dependency manager. Users can report any issues during this process on GitHub.
Embedded overlapping interfaces
The language itself receives a change. From the release notes:
Per the overlapping interfaces proposal, Go 1.14 now permits embedding of interfaces with overlapping method sets: methods from an embedded interface may have the same names and identical signatures as methods already present in the (embedding) interface. This solves problems that typically (but not exclusively) occur with diamond-shaped embedding graphs. Explicitly declared methods in an interface must remain unique, as before.
1.14 improves the performance of
defer uses. Now, the overhead has been reduced to nearly zero and users can use
defer in their production-critical code without having to worry about performance.
In addition to this, goroutines are now asynchronously preemptible. Programs built with Golang 1.14 will receive more signals on Unix systems, including Linux and macOS systems, as compared to programs built with older releases.
Internal timers have been made more efficient, which should cause performance improvements without any visible changes. The page allocator also received an efficiency update.