← ClaudeAtlas

golang-samber-lolisted

Implement, review, or optimize typed collection transformations with `github.com/samber/lo` and its parallel, mutable, iterator, or experimental subpackages. Use when a project already uses lo or deliberately selects it for collection-oriented code.
reagin/agent-skills · ★ 0 · Code & Development · score 63
Install: claude install-skill reagin/agent-skills
# samber/lo collection helpers Inspect `go.mod`, imports, the repository's Go version, nearby loops or helper chains, and tests. Compare the selected lo release with the standard `slices`, `maps`, and iterator APIs before choosing an implementation. ## Choose the package deliberately Subpackages appear at different points in lo's history, so confirm each import in the pinned module: | Import | Typical role | Contract to verify | | --- | --- | --- | | `github.com/samber/lo` | Eager collection and value helpers | allocation, nil/empty, ordering | | `github.com/samber/lo/parallel` | Concurrent transforms, often aliased `lop` | callback concurrency and result order | | `github.com/samber/lo/mutable` | In-place transforms, often aliased `lom` | backing-array mutation and returned length | | `github.com/samber/lo/it` | Lazy iterator pipelines, often aliased `loi` | required Go toolchain and evaluation timing | | `github.com/samber/lo/exp/simd` | Experimental numeric operations | architecture, build constraints, API stability | Use the core package for ordinary eager transforms. Select parallel or mutable variants from measurements and ownership evidence. Iterator pipelines fit large or partially consumed sequences when the project's toolchain supports the package. ## Match the operation to its semantics Representative core families include: - `Map`, `Filter`, `Reject`, `Reduce`, and their error-aware variants; - `Find`, `Contains`, `Every`, `Some`, `First`, and `Last`; - `G