3 ms·
This is a lot more possible now that Go has generics (as of 1.18). I would probably never use these, as I find such libraries are a whole new domain-specific l
by benhoyt 3y ago
This is a lot more possible now that Go has generics (as of 1.18).
I would probably never use these, as I find such libraries are a whole new domain-specific language to learn, and often don't make things much simpler anyway, but here are some libraries where people have done something like this:
- https://github.com/ahmetb/go-linq https://github.com/ahmetb/go-linq: modelled after LINQ, but created pre-generics so only recently added some generics features
- https://github.com/samber/lo https://github.com/samber/lo: kind of like JavaScript's lodash library but for Go 1.18+ (with generics)
- https://github.com/asynkron/gofun https://github.com/asynkron/gofun: simple library with stand-alone functions to filter, map, and so on