Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kfcampbell/glinq
Provides a LINQ API using Go generics.
https://github.com/kfcampbell/glinq
Last synced: 13 days ago
JSON representation
Provides a LINQ API using Go generics.
- Host: GitHub
- URL: https://github.com/kfcampbell/glinq
- Owner: kfcampbell
- License: mit
- Created: 2022-03-28T22:17:10.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-09T17:09:17.000Z (over 2 years ago)
- Last Synced: 2024-12-15T19:14:37.975Z (25 days ago)
- Language: Go
- Homepage:
- Size: 30.3 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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 LINQ
- Complete testing with code coverage
- Usage instructions and examples
- Cancellation (esp. in channel operations)
- Decide whether to implement container types (e.g. Set) like .NET has
- Use `t.Run(tc.name, ...)` as the testing pattern rather than the janky string constructions currently in place.
- Consider using literal instantiations instead of `make` everywhere
- Organize file structure better[LINQ API scheme](https://docs.microsoft.com/en-us/dotnet/api/system.linq.enumerable?view=net-6.0):
- [x] Aggregate
- [x] All
- [x] Any
- [x] Append
- won't implement
- [x] AsEnumerable
- won't implement
- [x] Average
- [x] Cast
- won't implement
- [x] Chunk
- [x] Concat
- won't implement
- [x] Contains
- [x] Count
- [ ] DefaultIfEmpty
- not worth implementing?
- [x] Distinct
- [x] DistinctBy
- [ ] ElementAt
- not worth implementing?
- [ ] ElementAtOrDefault
- not worth implementing?
- [ ] Empty
- not worth implementing?
- [x] Except
- [x] ExceptBy
- [x] First
- [ ] FirstOrDefault
- not worth implementing?
- [ ] GroupBy
- is this possible without anonymous types?
- [ ] GroupJoin
- [x] Intersect
- [x] IntersectBy
- [ ] Join
- is this possible without anonymous types?
- [x] Last
- [ ] LastOrDefault
- not worth implementing?
- [x] LongCount
- [x] Max
- [x] MaxBy
- [x] Min
- [x] MinBy
- [ ] OfType
- is this possible with Go slices/channels?
- [x] OrderBy
- [x] OrderByDescending
- [x] Prepend
- [x] Range
- [x] Repeat
- [ ] Reverse
- [x] Select
- [ ] SelectMany
- [ ] SequenceEqual
- [ ] Single
- [ ] SingleOrDefault
- [x] Skip
- [x] SkipLast
- [x] SkipWhile
- [ ] Sum
- [ ] Take
- [ ] TakeLast
- [ ] TakeWhile
- [ ] ThenBy
- [ ] ThenByDescending
- [ ] ToArray
- [ ] ToDictionary
- [ ] ToHashSet
- [ ] ToList
- [ ] ToLookup
- [ ] TryGetNonEnumeratedCount
- [ ] Union
- [ ] UnionBy
- [x] Where
- [ ] ZipIs there a way to add these methods onto generic slices/chans? Probably not, but if possible, should we?