Golang 1.16, the latest stable release of the language, is available in Fedora 34. Compared to Golang 1.15, there are a number of changes, including, among others:
Module-aware mode is enabled by default, further consolidating Golang’s move towards modules being the preferred dependency management system.
go installcommand has been updated, adding the ability to build by version suffixes. It is now recommended that one use
go installfor building and installing Golang packages when using modules.
Published modules can now be flagged as 'retracted' using the
go.mod. This does not remove a published version, but it will be ignored for users wanting the
latestversion of a module. Dependencies for a retracted module are preserved, but there is a warning for those who specifically wish to use the retracted package (dependencies will not break as a result of using
Static files and file trees can now be part of an executable using the
The Golang runtime is improved, with memory allocation on Linux now reacting quicker to system memory demand.
runtime/metricspackage allows for better monitoring of the Golang runtime.
The linker has been further improved compared to v1.15 and is significantly quicker, uses less memory, and usually creates smaller executables.
iopackage has been updated, including adding of the
io/fspackage for interface with the file system, as well as deprecation of
io/ioutil. Functionality of
io/ioutilhas been moved to other packages (
GOVCSenvironment variable has been introduced to allow users to specify which version control system can be trusted and used to download source code.
For further details, see the Golang 1.16 release notes.
Want to help? Learn how to contribute to Fedora Docs ›