Lot of interesting thing scheduled for Go 1.24, but this one looks particularly exciting:
The new Text function can be used to generate cryptographically secure random text strings.
You’d be surprised how often I need to generate random strings. Doing so, without installing a third-party package, is always a bit involved; either generating a UUID and stripping the dashes, or doing a Base64 on a random byte slice. To be given a function to do this from the standard library will be most welcome.
And yes, I know generating a UUID usually involves installing a package (it’s high time Go’s standard library included a UUID implementation IMHO), but it’s usually a package I import anyway. Either that, or go-nanoid.