1.20.14

Latest release in branch 1.20
Released 2 years ago (February 06, 2024)

Software Go
Branch 1.20
Status
End of life
End of life February 06, 2024
First official release version 1.20
First official release date 3 years ago (February 01, 2023)
Release notes https://go.dev/doc/go1.20
Source code https://github.com/golang/go/tree/go1.20.14
Documentation https://go.dev/doc/
Go 1.20 Releases View full list

What Is New in Go 1.20

Go 1.20 introduces targeted enhancements across the language, standard library, and toolchain. These updates focus on improving performance, security, and developer experience without major breaking changes.

Category Key Changes
Language Method conversions, struct comparison changes, slice to array conversions
Ports New support for FreeBSD on RISC-V, dropped support for Windows 7/8/Server 2008/2012
Tools Go command changes, vet improvements, profile-guided optimization
Runtime & Compiler Memory management optimizations, faster builds
Library New wrapping multiple errors, crypto/rsa improvements, HTTP ResponseController

What language changes should Go developers know about?

Go 1.20 adds several subtle but useful language features. The most significant change allows converting a slice to an array pointer, giving developers more control over memory layout.

You can now write s := make([]byte, 2, 4) followed by s2 := (*[2]byte)(s). This conversion panics if the slice is shorter than the array length, so use it carefully. Struct comparison rules were also updated to handle blank fields and non-comparable types more consistently.

How does profile-guided optimization improve Go performance?

Profile-guided optimization (PGO) is now production-ready in Go 1.20. It lets the compiler optimize based on real workload profiles collected from your application.

After building your binary with -cpuprofile, the compiler uses that data to make better inlining decisions and optimize hot code paths. Early adopters see 2-4% performance gains in production systems. This matters because it allows the compiler to make data-driven optimizations specific to your application's behavior.

What security improvements were made to the crypto libraries?

The crypto packages received important security hardening in Go 1.20. crypto/rsa now uses constant-time implementations for RSA operations, preventing timing attacks.

Additionally, the crypto/tls and crypto/x509 packages dropped support for SHA-1 certificates and improved verification logic. These changes make Go's cryptographic primitives more resistant to side-channel attacks by default.

How does the new errors package improve error handling?

Go 1.20 enhances error handling with support for wrapping multiple errors. The new errors.Join function returns an error that wraps multiple other errors.

This is particularly useful when you need to aggregate errors from concurrent operations. The returned error implements Unwrap() []error allowing you to extract all wrapped errors. In practice, this simplifies error handling patterns in concurrent code where multiple operations might fail independently.

What platform support changes affect deployment targets?

Go 1.20 adds and removes several platform targets. The most notable addition is FreeBSD on RISC-V (freebsd/riscv64), expanding Go's support for emerging hardware architectures.

Conversely, Go dropped support for Windows 7, 8, Server 2008, and Server 2012. If you're deploying to older Windows systems, you'll need to stick with Go 1.19 or upgrade your operating systems. The runtime also improved memory management on ARM64 and PowerPC architectures.

FAQ

Does Go 1.20 break existing code?
Most existing code should work unchanged. The language changes are backward-compatible additions, though the Windows platform drop might affect some deployments.

How significant are the performance improvements?
Most users will see 1-3% performance gains from compiler optimizations. Applications using PGO can achieve 2-4% additional improvements based on their specific profiles.

What's the most impactful change for web servers?
The new HTTP ResponseController provides finer-grained control over response behaviors, allowing per-request overrides of standard library defaults.

Should I upgrade to Go 1.20 for better security?
Yes, the constant-time cryptographic operations in crypto/rsa alone justify upgrading security-sensitive applications.

How does the new coverage tool work?
Go 1.20 supports whole-program coverage analysis, collecting coverage data across multiple packages and tests for better code coverage insights.

Releases In Branch 1.20

Version Release date
1.20.14 2 years ago
(February 06, 2024)
1.20.13 2 years ago
(January 09, 2024)
1.20.12 2 years ago
(December 05, 2023)
1.20.11 2 years ago
(November 07, 2023)
1.20.10 2 years ago
(October 10, 2023)
1.20.9 2 years ago
(October 05, 2023)
1.20.8 2 years ago
(September 06, 2023)
1.20.7 2 years ago
(August 01, 2023)
1.20.6 2 years ago
(July 11, 2023)
1.20.5 2 years ago
(June 06, 2023)
1.20.4 2 years ago
(May 02, 2023)
1.20.3 3 years ago
(April 04, 2023)
1.20.2 3 years ago
(March 07, 2023)
1.20.1 3 years ago
(February 14, 2023)
1.20 3 years ago
(February 01, 2023)
1.20rc3 3 years ago
(January 12, 2023)
1.20rc2 3 years ago
(January 04, 2023)
1.20rc1 3 years ago
(December 07, 2022)