Golang
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.
-
The
go install
command has been updated, adding the ability to build by version suffixes. It is now recommended that one usego install
for building and installing Golang packages when using modules. -
Published modules can now be flagged as 'retracted' using the
retract
flag ingo.mod
. This does not remove a published version, but it will be ignored for users wanting thelatest
version 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 usingretract
). -
Static files and file trees can now be part of an executable using the
embed
package. -
The Golang runtime is improved, with memory allocation on Linux now reacting quicker to system memory demand.
-
The
runtime/metrics
package 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.
-
The
io
package has been updated, including adding of theio/fs
package for interface with the file system, as well as deprecation ofio/ioutil
. Functionality ofio/ioutil
has been moved to other packages (io
andos
). -
The
GOVCS
environment 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 ›