Latest in branch 1.5
1.5.4
Released 11 Apr 2016
(10 years ago)
SoftwareGo
Version1.5
Status
End of life
Initial release1.5
19 Aug 2015
(10 years ago)
Latest release1.5.4
11 Apr 2016
(10 years ago)
End of life15 Aug 2016
(Ended 9 years, 9 months ago)
Release noteshttps://go.dev/doc/go1.5
Source codehttps://github.com/golang/go/tree/go1.5.4
Documentationhttps://go.dev/doc/
Go 1.5 ReleasesView full list

What Is New in Go 1.5

Go 1.5 is a massive release that fundamentally changed the toolchain and runtime. The compiler and runtime are now written entirely in Go, garbage collection is far more efficient, and the build system supports vendoring natively.

Category Key Changes
Major Changes Go compiler rewritten in Go; New garbage collector; Native vendor support
Performance Precise GC pauses under 10ms; Improved goroutine scheduling; Faster maps for int keys
Tools New `go tool trace` command; Cross-compilation enabled by default; Internal packages enforced
Standard Library New `context` package; Vendor experiment in `go` command; Runtime metrics

What are the biggest changes in Go 1.5?

The two most significant changes are the self-hosting compiler and the new concurrent garbage collector. The entire toolchain (compiler, linker, assembler) was translated from C to Go, a huge milestone for the project. In practice, this didn't change how you write code but was a major step for the language's development.

The new garbage collector is a concurrent, tri-color mark-and-sweep collector. This was a massive win for latency-sensitive applications, as it aimed to keep GC pauses under 10 milliseconds. You'd immediately notice smoother performance in web servers and interactive applications.

How did the Go 1.5 garbage collector improve performance?

It introduced concurrency, drastically reducing stop-the-world pauses. The previous GC would freeze the entire program, causing noticeable hiccups. The 1.5 collector runs most of its work concurrently with your application's goroutines.

This was a game-changer for services requiring low latency. While total GC time might have been similar, the pauses were shorter and more predictable. You could finally run Go in more real-time scenarios without fear of multi-millisecond freezes.

What new tools did Go 1.5 introduce?

The release added the powerful go tool trace command. This tool provides a visual trace of your program's execution, letting you see goroutine scheduling, garbage collection cycles, and network blocking events. It became an essential tool for debugging performance issues.

Cross-compilation to other platforms (like building for Linux on a Mac) became a default feature, no longer requiring custom environment variables. The build system also started enforcing the "internal" package rule, preventing imports of internal packages from outside their parent directory tree.

How did dependency management change in Go 1.5?

Go 1.5 introduced experimental support for vendoring dependencies with the GO15VENDOREXPERIMENT=1 environment variable. This allowed you to place external dependencies in a vendor/ directory at the root of your project, which the go tool would then use.

This was the first major step toward the official dependency management we have today. It solved the "works on my machine" problem by ensuring everyone used the same version of a dependency checked into the project, a huge improvement over the old GOPATH model.

What was the new context package for?

The context package was added to the standard library as a solidification of patterns used inside Google. It provides a standard way to carry deadlines, cancellation signals, and request-scoped values across API boundaries and between goroutines.

In practice, this became the canonical way to handle cancellation for HTTP requests and other operations. It cleaned up a lot of ad-hoc channel patterns and made it easier to build services that properly handled timeouts and graceful shutdowns.

FAQ

Is the Go 1.5 garbage collector a generational GC?
No, it's a concurrent, non-generational, tri-color mark-and-sweep collector. The focus was entirely on reducing latency, not on generational hypothesis which assumes most objects die young.

Why rewrite the compiler in Go? Wasn't that risky?
The rewrite aimed to make the compiler easier to maintain and extend. The Go team used mechanical translation from C to Go, not a manual rewrite, which significantly reduced the risk of introducing new bugs.

What happened to the C compiler (6g, 8g) in Go 1.5?
The old C-based compilers were removed entirely. The new Go-based toolchain produced identical output, making the switch transparent for most developers, just faster to build.

How do I use the new vendor experiment in 1.5?
Set GO15VENDOREXPERIMENT=1 and create a vendor/ directory in your project root. The go commands will then look in this directory for dependencies before checking GOPATH.

Did the language syntax change in Go 1.5?
No, the Go 1 compatibility promise held strong. There were no changes to the language syntax or semantics that would break existing, valid Go 1.x code.

Releases In Branch 1.5

VersionRelease date
1.5.411 Apr 2016
(10 years ago)
1.5.313 Jan 2016
(10 years ago)
1.5.203 Dec 2015
(10 years ago)
1.5.109 Sep 2015
(10 years ago)
1.519 Aug 2015
(10 years ago)
1.5rc106 Aug 2015
(10 years ago)
1.5beta329 Jul 2015
(10 years ago)
1.5beta217 Jul 2015
(10 years ago)
1.5beta107 Jul 2015
(10 years ago)