Though there are several generics code generation tools available, let's look at my personal favorite, clipperhouse/gen.
We get the following functions for free with the clipperhouse/gen tool:
Aggregation | Filter | Map | Misc |
Aggregate[T] | All | Select[T] | List |
Average | Any | Where | Ring |
Average[T] | Distinct | Set | |
Count | DistinctBy | stringer | |
Max | First | ||
Max[T] | GroupBy[T] | ||
MaxBy | Shuffle | ||
Min | Sort | ||
Min[T] | SortBy | ||
MinBy |
gen is a code-generation tool for Go. It's intended to offer generics-like functionality for your types. Out of the box, it offers LINQ/underscore-inspired methods.