3 min read

Yesterday, the team at Gophers released Go 1.12rc1, a release candidate version of Go 1.12. This release comes with improved runtime, updated libraries, ports and more.

What’s new in Go 1.12rc1

Trace

In Go 1.12rc1, the trace tool supports plotting mutator utilization curves, including cross-references to the execution trace. These are used to analyze the impact of the garbage collector on application latency and throughput.

Assembler

On arm64, the platform register was renamed from R18 to R18_PLATFORM to prevent accidental use, as the OS could choose to reserve this register.

Runtime

This release improves the performance of sweeping when a large fraction of the heap remains live. This reduces allocation latency following a garbage collection.The Go runtime now releases memory back to the operating system and particularly in response to large allocations that can’t reuse existing heap space. In this release, the runtime’s timer and deadline code is faster and scales better with higher numbers of CPUs. It also improves the performance of manipulating network connection deadlines.

Ports

With this release, the race detector is now supported on linux/arm64. Go 1.12rc1 is supported on FreeBSD 10.x.

Windows

The new windows/arm port supports Go on Windows 10 IoT Core on 32-bit ARM chips such as the Raspberry Pi 3.

AIX

This release supports AIX 7.2 and later on POWER8 architectures (aix/ppc64). Though external linking, pprof, cgo, and the race detector aren’t yet supported.

Darwin

This one is the last release to run on macOS 10.10 Yosemite, as Go 1.13 will need macOS 10.11 El Capitan or later. libSystem is now used while making syscalls on Darwin, which ensures forward-compatibility with future versions of macOS and iOS. This switch to libSystem has triggered additional App Store checks for private API usage.

Tools

The go tool vet is no longer supported. With this release, the go vet command has been rewritten to serve as the base for a range of different source code analysis tools. Even the external tools that use go tool vet must be changed to use go vet. Using go vet instead of go tool vet will work with all supported versions of Go. Even the experimental -shadow option is no longer available with go vet.

Build cache requirement

The build cache is now used for eliminating $GOPATH/pkg. With Go 1.12rc1, setting the environment variable GOCACHE=off will cause go commands to fail.

Binary-only packages

This one is the last release that will support binary-only packages.

Cgo

This release translates the C type EGLDisplay to the Go type uintptr. In this release, mangled C names are no longer accepted by the packages that use Cgo. The Cgo names are used now instead.

Minor changes to the library

Bufio: In this release, the reader’s UnreadRune and UnreadByte methods will now return an error if they are called after Peek.

Bytes: This release comes with a new function, ReplaceAll that returns a copy of a byte slice with all non-overlapping instances of a value replaced by another.

To know more about this news, check out the official post.

Read Next

Introduction to Creational Patterns using Go Programming

Go Programming Control Flow

Essential Tools for Go Programming