Skip to content

Version 0.9

Choose a tag to compare

@CreateLab CreateLab released this 16 Nov 10:42
· 16 commits to main since this release
756049c
# glinq v0.9.0

LINQ-like library for Go with lazy evaluation and fluent API.

## Features

- ✅ Lazy evaluation - operations execute only on materialization
- ✅ Type-safe generics (Go 1.21+)
- ✅ Fluent chainable API
- ✅ Zero dependencies

## Main Operations

**Filtering & Transform**
- `Where`, `Select`, `Map`, `Distinct`, `DistinctBy`

**Sorting**
- `OrderBy`, `OrderByDescending` (with custom comparator)

**Partitioning**
- `Take`, `Skip`, `Chunk`

**Set Operations**
- `Concat`, `Union`, `Intersect`, `Except` (+ `*By` versions)

**Aggregation**
- `Count`, `First`, `Last`, `Any`, `All`, `Min`, `Max`, `Aggregate`

**Map Support**
- `FromMap`, `ToMap`, `ToMapBy`, `Keys`, `Values`

## Example

```go
result := glinq.From([]int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}).
    Where(func(x int) bool { return x > 5 }).
    OrderBy(func(a, b int) int { return b - a }).
    Take(3).
    ToSlice()
// [10, 9, 8]