1.0.3

Latest release in branch 1.0
Released 13 years ago (September 21, 2012)

Software Go
Branch 1.0
Status
End of life
End of life November 28, 2013
First official release version 1
First official release date 14 years ago (March 28, 2012)
Release notes https://go.dev/doc/go1
Source code https://github.com/golang/go/tree/go1.0.3
Documentation https://go.dev/doc/
Go 1.0 Releases View full list

What Is New in Go 1.0

Go 1.0 marks the first stable release, establishing a foundation for long-term compatibility. This version focuses on stability and a clear specification for the language and libraries.

Category Key Changes
Language Frozen specification, semantic changes for struct equality and map keys
Packages Stable standard library API, new packages (e.g., fmt, http, json)
Implementation New garbage collector, goroutine scheduler, gofmt tool
Tools Go command, cgo, godoc, gofix for automatic code updates
Portability Support for FreeBSD, Linux, OS X, and Windows

What language changes were introduced in Go 1.0?

The language specification was finalized, meaning no breaking changes would be made to the syntax or semantics that would break existing Go 1 code. A few semantic clarifications were made, particularly around the equality of struct values and which types are valid as map keys.

In practice, this stability guarantee was the single most important feature for adoption. It meant developers could write code without fear of it breaking with future point releases.

Which new packages were added to the standard library?

Go 1.0 introduced a comprehensive set of packages that formed the core of its standard library. Key additions included the http package for building servers and clients, json for encoding and decoding, and the powerful fmt package for formatted I/O.

Other crucial packages like bytes, strings, strconv, and os were also part of this initial stable release. The API for these packages was declared stable and subject to the Go 1 compatibility promise.

How did the implementation and tools improve?

The compiler toolchain was solidified with the release of the go command, which handles building, testing, and installing packages. The suite of tools included gofmt for automatically formatting code, godoc for documentation, and gofix to automatically update code from pre-1.0 versions.

Under the hood, the runtime saw significant upgrades with a new garbage collector and a more efficient goroutine scheduler. These changes made concurrent programs more performant and manageable.

What operating systems did Go 1.0 support?

Go 1.0 provided official support for FreeBSD, Linux, OS X, and Windows operating systems. This cross-platform support was a core tenet of the language's design, enabling developers to build and deploy software across different environments with a single codebase.

The portability was achieved through the design of the runtime and standard library, which abstracted away OS-specific details. This made Go a compelling choice for writing systems and network services that needed to run anywhere.

FAQ

Is Go 1.0 code still compatible with the latest versions of Go?
Yes, absolutely. The Go 1 compatibility promise guarantees that programs written for Go 1.0 will continue to compile and run correctly with all subsequent Go 1.x releases, protecting investments in code.

What was the main goal of the gofix tool?
Gofix was provided to automatically update source code from pre-1.0 syntax and API calls to the new, stable Go 1.0 equivalents. It handled many tedious changes, making the migration path much smoother for early adopters.

Did Go 1.0 have generics?
No, Go 1.0 did not include generics. The initial design prioritized simplicity and fast compilation, and the feature was intentionally left for future consideration, eventually arriving much later in Go 1.18.

How did error handling work in Go 1.0?
Error handling used multiple return values, where the last value was typically of the error interface type. This became a defining characteristic of Go code, requiring explicit checking of errors instead of using exceptions.

Was the garbage collector stop-the-world in Go 1.0?
Yes, the garbage collector in Go 1.0 was a conservative, parallel, stop-the-world collector. While effective, it would pause all goroutines during collection, which led to significant improvements in later versions to reduce pause times.

Releases In Branch 1.0

Version Release date
1.0.3 13 years ago
(September 21, 2012)
1.0.2 13 years ago
(June 14, 2012)
1.0.1 13 years ago
(April 26, 2012)
1 14 years ago
(March 28, 2012)