Golang 1.21 brings built-in functions, profile-guided optimization
Go 1.21, the latest update of Google’s Go programming language, is now available as a release candidate. The new version adds built-in functions—
min
,max
, andclear
—and makes profile-guided optimization (PGO) generally available. WebAssembly accommodations also are highlighted.The
min
andmax
functions compute the smallest or largest value, respectively, of a fixed number of arguments or ordered types. There must be at least one argument. Theclear
function takes an argument of map, slice, or type parameter type and deletes or zeroes out all of the elements.
Author: . [Source Link (*), InfoWorld]