golang-samber-lo

Apply type-safe Map, Filter, Reduce, and GroupBy transforms to Go collections.

1|Updated Apr 4, 2026
One-click install
npx skills add https://github.com/Jylhis/claude-marketplace --skill golang-samber-lo-jylhis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-samber-lo
Source: https://github.com/Jylhis/claude-marketplace/tree/main/plugins/golang-dev/skills/golang-samber-lo
Command: npx skills add https://github.com/Jylhis/claude-marketplace --skill golang-samber-lo-jylhis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It reduces boilerplate and error-prone manual loops by providing a comprehensive, type-safe set of collection transformation helpers for Go so developers can write declarative Map, Filter, Reduce, GroupBy and related operations with confidence.

Core Features & Use Cases

  • Immutable core transforms: Map, Filter, Reduce, GroupBy, Chunk, Flatten and many more that return new collections and are safe for concurrent reads.
  • Performance-oriented variants: Parallel transforms for CPU-bound workloads, mutable in-place functions for allocation-sensitive hot paths, and lazy iterators to eliminate intermediate allocations in long pipelines.
  • Broad domain support: Helpers for slices, maps, strings, tuples, channels, math, concurrency, and experimental SIMD for numeric bulk ops.
  • Use Case: Transform large datasets, group and aggregate records, or implement concise data-processing pipelines in Go projects while choosing the right package based on profiling and Go version.

Quick Start

Use the golang-samber-lo skill to explain which samber/lo package and functions to use for transforming a large slice of structs into a grouped summary.

Frequently Asked Questions about golang-samber-lo

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I apply functional transforms like Map and Filter to Go slices without writing manual loops?

Functional transforms in Go slices use type-safe helpers for Map, Filter, and Reduce to replace manual loops with declarative operations. This approach returns new collections, ensuring safe concurrent reads while reducing boilerplate code.

What is the best way to group and aggregate a large slice of structs in Go?

Grouping and aggregating Go structs is best handled by type-safe functional helpers like GroupBy. These helpers enable declarative data-processing pipelines, allowing you to group records and apply transforms across slices without error-prone manual iteration.

Does the samber/lo library support lazy iterators for long data pipelines in Go?

The samber/lo library supports lazy iterators to eliminate intermediate allocations in long pipelines. Introduced for Go 1.23+, iterators allow efficient, deferred execution of functional collection transforms across slices and channels.

Can I use functional collection helpers for performance-sensitive Go hot paths?

Functional collection helpers provide mutable in-place variants specifically for performance-sensitive Go hot paths. These allocation-conscious functions modify collections directly rather than returning new instances, optimizing CPU-bound workloads.

What Go version is required for parallel collection transforms and SIMD operations?

Parallel collection transforms require Go 1.18+ for core generics support, while lazy iterators need Go 1.23+ and experimental SIMD numeric operations require Go 1.25+. These versions enable type-safe, concurrent functional helpers for performance-oriented workloads.

When should I avoid immutable collection transforms in Go?

You should avoid immutable collection transforms in Go when operating within allocation-sensitive hot paths or processing extremely large datasets. In these cases, mutable in-place variants or lazy iterators are preferred to prevent memory pressure from intermediate allocations.