Am I reading this correctly? The standard library has no built in function to get a slice of keys from a map? You need to iterate every single time and build up an extra list??

@mauve the #golang 1.21 release which will be released soon (days or weeks, it’s at rc3 currently I think) will include the `maps` module in stdlib, which includes a `Keys()` implementation: pkg.go.dev/maps@master#Keys

@fansipans @mauve At least weeks; the scheduled release date is the beginning of the second week of August, but it could be later if they have to do another RC. go.dev/s/release

Follow

@lukeshu @fansipans ha
ha, I think I can deal with for loops until then. :P It's defs not ideal but also not all that bad.

Sign in to participate in the conversation
Mauvestodon

Escape ship from centralized social media run by Mauve.