1.8.7

Latest release in branch 1.8
Released 8 years ago (February 07, 2018)

Software Go
Branch 1.8
Status
End of life
End of life February 16, 2018
First official release version 1.8
First official release date 9 years ago (February 16, 2017)
Release notes https://go.dev/doc/go1.8
Source code https://github.com/golang/go/tree/go1.8.7
Documentation https://go.dev/doc/
Go 1.8 Releases View full list

What Is New in Go 1.8

Category Key Changes
Language Struct field alignment, nil context handling
Tools Faster compilation, automatic vendoring, default GOPATH
Performance Sub-millisecond GC pauses, optimizations in compiler and linker
Standard Library New HTTP/2 Push, context package, graceful shutdown, Sort slice helpers

What language changes were introduced in Go 1.8?

Go 1.8 made subtle but meaningful adjustments to how the language handles certain edge cases. The compiler now ensures struct fields are properly aligned for 64-bit atomic operations on 32-bit architectures, preventing potential crashes.

Another change allows passing nil as a context parameter to functions that accept context.Context. This simplifies code when you don't need context-specific functionality but must satisfy an interface.

How did build tools improve in this release?

Build times got significantly faster with optimizations throughout the toolchain. The compiler and linker both saw performance improvements that make day-to-day development more responsive.

The tooling now automatically recognizes and uses the vendor directory without needing special flags. If you don't set GOPATH, it defaults to $HOME/go on Unix systems and %USERPROFILE%\go on Windows, simplifying setup for new developers.

What performance gains can we expect from Go 1.8?

The garbage collector now consistently achieves sub-millisecond pause times, even for large heaps. This was a major milestone that made Go suitable for latency-sensitive applications that couldn't tolerate GC interruptions.

Beyond GC improvements, the compiler generates better code with more optimizations, and the linker works faster. These combined improvements make both development and production execution noticeably smoother.

What are the most useful standard library additions?

The HTTP package gained server push support for HTTP/2, allowing servers to push resources to clients before they're requested. The new context package moved from x/net/context to the standard library, becoming the official way to handle request cancellation and timeouts.

Server developers got Shutdown() method for graceful shutdown without dropping connections, and the sort package added helpers like sort.Slice() for sorting slices without defining custom types.

FAQ

Does the automatic vendoring mean I should stop using dependency management tools?
No, the automatic vendor directory recognition complements rather than replaces dependency management. It helps tools like dep and later modules work with existing vendor directories without extra flags.

How significant are the GC pause improvements for real applications?
Extremely significant. The sub-millisecond pauses mean many applications won't notice GC happening at all, making Go viable for high-frequency trading, gaming servers, and other latency-critical systems.

Should I immediately switch all my context usage to the new standard library package?
Yes, the context package in the standard library is the same one that was in golang.org/x/net/context. You can update imports to use context instead of the x/net version.

What happens if my code depends on the old struct alignment behavior?
Your code might break on 32-bit architectures if it relied on the previous alignment. The compiler will now ensure proper alignment for atomic operations, which could change struct layout in some cases.

Is the default GOPATH a good replacement for setting my own?
It's great for beginners and simple projects, but most experienced developers will still want to configure specific GOPATH settings for better control over their workspace organization.

Releases In Branch 1.8

Version Release date
1.8.7 8 years ago
(February 07, 2018)
1.8.6 8 years ago
(January 23, 2018)
1.8.5 8 years ago
(October 25, 2017)
1.8.5rc5 8 years ago
(October 25, 2017)
1.8.5rc4 8 years ago
(October 20, 2017)
1.8.4 8 years ago
(October 04, 2017)
1.8.3 8 years ago
(May 24, 2017)
1.8.2 8 years ago
(May 23, 2017)
1.8.1 9 years ago
(April 07, 2017)
1.8 9 years ago
(February 16, 2017)
1.8rc3 9 years ago
(January 26, 2017)
1.8rc2 9 years ago
(January 19, 2017)
1.8rc1 9 years ago
(January 10, 2017)
1.8beta2 9 years ago
(December 15, 2016)
1.8beta1 9 years ago
(December 01, 2016)