Chapter 6. Changes in Go Toolset 1.23
RHEL provides Go Toolset in version 1.23. Notable enhancements include:
The
for-rangeloop accepts iterator functions of the following types:-
func(func() bool) -
func(func(K) bool) func(func(K, V) bool)Calls of the iterator argument function create the iteration values for the
for-rangeloop. For reference links, see the upstream release notes.
-
- The Go Toolchain can collect usage and breakage statistics to help the Go team to understand how the Go Toolchain is used and working. By default, Go Telemetry does not upload telemetry data and stores it only locally. For further information, see the upstream Go Telemetry documentation.
-
The
go vetsubcommand includes thestdversionanalyzer which flags references to symbols that are too new for the version of Go you use in the referring file. -
The
cmdandcgofeatures support the-ldflagsoption to pass flags to the C linker. Thegocommand uses this flag automatically to avoidargument list too longerrors when you use a very largeCGO_LDFLAGSenvironment variable. -
The
traceutility tolerates partially broken traces and attempts to recover the trace data. This is useful in case of crashes because you can get the trace leading up to the crash. -
The traceback printed by the runtime after an unhandled panic or other fatal error carries indentation to distinguish the stack trace of the
goroutinefrom the firstgoroutine. - The compiler build time overhead of using profile-guided optimization was reduced to single-digit percentage.
-
The new
-bindnowlinker flag enables immediate function binding when building a dynamically-linked ELF binary. -
The
//go:linknamelinker directive no longer refer to internal symbols in the standard library and the runtime that are not marked with//go:linknameon their definition. -
If a program no longer refers to a
TimerorTicker, garbage collection cleans them up immediately even if theirStopmethod has not been called. The timer channel associated with aTimerorTickeris now unbuffered with capacity 0. This ensures that, every time aResetorStopmethod is called, no stale values are not sent or received after the call. -
The new
uniquepackage provides facilities for canonicalizing values, such asinterningorhash-consing. -
The new
iterpackage provides the basic definitions to work with user-defined iterators. -
The
slicesandmapspackages introduce several new functions that work with iterators. -
The new
structspackage provides types for struct fields that modify properties of the containing struct type, such as memory layout. Minor changes are made in the following packages:
-
archive/tar -
crypto/tls -
crypto/x509 -
database/sql -
debug/elf -
encoding/binary -
go/ast -
go/types -
math/rand/v2 -
net -
net/http -
net/http/httptest -
net/netips -
path/filepath -
reflect -
runtime/debug -
runtime/pprof -
runtime/trace -
slices -
sync -
sync/atomic -
syscall -
testing/fstest -
text/template -
time -
unicode/utf16
-
For more information, see the upstream release notes.
Go Toolset is a rolling Application Stream, and Red Hat supports only the latest version. For more information, see the Red Hat Enterprise Linux Application Streams Life Cycle document.