Go 1.21
This version has reached end of life and no longer receives updates.
August 8, 2023
Ongoing
August 13, 2024
1.21.13 (August 6, 2024)
About Go 1.21
Go 1.21 introduced the standard library log/slog package for structured logging, built-in min/max/clear functions, and profile-guided optimization (PGO) enabled by default.
Key Changes in Go 1.21
- ●log/slog: structured, leveled logging in the standard library (no more third-party loggers for basic needs)
- ●Built-in
min(),max(), andclear()functions - ●Profile-guided optimization (PGO) enabled by default (2-7% performance improvement)
- ●Forward compatibility: go.mod
goline becomes a minimum version requirement - ●New
mapsandslicespackages in stdlib
Breaking Changes
- ▲Go line in go.mod now enforces minimum version (may affect builds with older Go versions)
- ▲Loop variable experiment available via GOEXPERIMENT (later default in 1.22)
Go 1.21 reached end of life on August 13, 2024, roughly 1 year ago. Since then, no security patches have been issued. If you are still running Go 1.21, you should treat upgrading as a high-priority item. Any CVEs discovered against this version will not be fixed upstream.
The recommended upgrade target is Go 1.26. You are 2 major versions behind, so review the changelog for each version in between to catch any breaking changes. A staged upgrade through each major version is often safer than jumping directly.
Migration Notes
Go 1.21 is backwards compatible. The main change to be aware of is PGO being on by default (can increase binary size slightly). If you use a default.pgo file, it will be used automatically.
Lifecycle Progress
This version reached end of life August 13, 2024.
All Go Versions
| Version | Released | EOL | Latest | Status |
|---|---|---|---|---|
| 1.26 | February 11, 2026 | TBD | 1.26.0 | Active |
| 1.25 | August 12, 2025 | TBD | 1.25.7 | Active |
| 1.24 | February 11, 2025 | February 11, 2026 | 1.24.13 | End of Life |
| 1.23 | August 13, 2024 | August 12, 2025 | 1.23.12 | End of Life |
| 1.22 | February 6, 2024 | February 11, 2025 | 1.22.12 | End of Life |
| 1.21 (current page) | August 8, 2023 | August 13, 2024 | 1.21.13 | End of Life |
| 1.20 | February 1, 2023 | February 6, 2024 | 1.20.14 | End of Life |
| 1.19 | August 2, 2022 | September 6, 2023 | 1.19.13 | End of Life |
| 1.18 | March 15, 2022 | February 1, 2023 | 1.18.10 | End of Life |
| 1.17 | August 16, 2021 | August 2, 2022 | 1.17.13 | End of Life |
| 1.16 | February 16, 2021 | March 15, 2022 | 1.16.15 | End of Life |
| 1.15 | August 11, 2020 | August 16, 2021 | 1.15.15 | End of Life |
| 1.14 | February 25, 2020 | February 16, 2021 | 1.14.15 | End of Life |
| 1.13 | September 3, 2019 | August 11, 2020 | 1.13.15 | End of Life |
| 1.12 | February 25, 2019 | February 25, 2020 | 1.12.17 | End of Life |
| 1.11 | August 24, 2018 | September 3, 2019 | 1.11.13 | End of Life |
| 1.10 | February 16, 2018 | February 25, 2019 | 1.10.8 | End of Life |
Frequently Asked Questions
When was Go 1.21 released?
When does Go 1.21 reach end of life?
What is the latest patch version of Go 1.21?
Should I still use Go 1.21?
Related Resources
Get release updates for Go
Breaking changes, security patches, EOL warnings. Monthly digest, no spam.
Free forever. Unsubscribe anytime. We track 50+ technologies.