Go 1.14, the latest version of the used to create , , , and other projects, is now available as a production release.
The Go upgrade, released February 25, improves the runtime and compiler. Version 1.14 also will be the last to support 32-bit Apple platforms, according to .
With the Go runtime improvements, the performance of most use cases of
defer has been boosted to incur nearly no overhead, compared to calling the deferred function directly. As a result,
defer now can be used in performance-critical code without overhead concerns.
The improved Go runtime also makes goroutines asynchronously pre-emptible. This means loops without function calls no longer potentially deadlock the scheduler or significantly delay garbage collection. This capability is supported on all platforms except
One consequence of the pre-emption implementation is that Go 1.14 programs on Linux and MacOS will receive more signals than earlier versions. Programs using packages such as
syscall or will see more slow system calls fail with
EINTR errors. These programs will have to handle those errors in some way, most likely by looping to try the system call again.
In addition, the page allocator is more efficient and incurs less lock contention at high values of
GOMAXPROCS. This will be most noticeable as lower latency and higher throughput for large allocations done in parallel and at a high rate.
js.Value objects now can be garbage-collected. However,
js.Value objects no longer can be compared using the
== operator. They must instead be compared using the
Equal method. Also,
js.Value now has
gocommand now supports Subversion repos in module mode. This command also now has snippets of plain-text error messages from module proxies and other HTTP servers. An error message is shown only if it is valid UTF-8 and has only graphic characters and spaces.
-modfile=file, instructs the
gocommand to read and possibly write an alternative go.mod file rather than the one in the module root directory.
go getcommand no longer accepts the
-modcacherw, instructs the
gocommand to leave newly created directories in the module cache at default permissions rather than being read-only. This flag makes it more likely that tests or other tools will accidentally add files not in the module’s verified checksum. But it allows the use of
rm-rfto remove the module cache.
GOINSECUREis a new environment variable that instructs the
gocommand to allow an HTTPS connection to skip certificate validation when fetching certain modules directly from their origins.
Go 1.14 can be downloaded from .
Copyright © 2020 IDG Communications, Inc.