glinq
glinq (prounced “glink”) is an attempt to provide a LINQ API using Go generics. The name uncreatively comes from combining Go and LINQ. Inspired by github.com/samber/lo
Long-term TODOs:
- Implement parallel operations
- Use fuzzing in testing
- Full coverage of functions in samber/lo
- Complete testing with code coverage
- Cancellation (esp. in channel operations)
LINQ API scheme?
- Aggregate
- All
- Any
- Append
- won’t implement
- AsEnumerable
- won’t implement
- Average
- Cast
- won’t implement
- Chunk
- Concat
- won’t implement
- Contains
- Count
- DefaultIfEmpty
- Distinct
- DistinctBy
- ElementAt
- ElementAtOrDefault
- Empty
- Except
- ExceptBy
- First
- FirstOrDefault
- GroupBy
- GroupJoin
- Intersect
- IntersectBy
- Join
- Last
- LastOrDefault
- LongCount
- Max
- MaxBy
- Min
- MinBy
- OfType
- OrderBy
- OrderByDescending
- Prepend
- Range
- Repeat
- Reverse
- Select
- SelectMany
- SequenceEqual
- Single
- SingleOrDefault
- Skip
- SkipLast
- SkipWhile
- Sum
- Take
- TakeLast
- TakeWhile
- ThenBy
- ThenByDescending
- ToArray
- ToDictionary
- ToHashSet
- ToList
- ToLookup
- TryGetNonEnumeratedCount
- Union
- UnionBy
- Where
- Zip
Is there a way to add these methods onto generic slices/chans? Probably not, but if possible, should we?