Built-in functions in Go 1.21



Go 1.21 brings many exciting things, from profile-guided optimization to standard library packages for structured logging, slices and maps operations (see the release notes for details). In this post, I’d like to skip all that and focus on the features that caught my eye: the new builtins.



In case you’re wondering, builtins are functions that do not require importing a package, like len or make. Go 1.21 brings three more of them: min, max and clear. Let’s take a look.



https://antonz.org/go-1-21-builtins