Is there a way to map an array of objects in golang?
In Go, arrays are inflexible (because their length is encoded in their type) and costly to pass to functions (because a function operates on copies of its array arguments). I’m assuming you’d like to operate on slices rather than on arrays. Because methods cannot take additional type arguments, you cannot simply declare a generic Map … Read more