golang-samber-lo

Generate type-safe functional helpers from samber/lo for Go data transforms.

Updated Mar 8, 2026
One-click install
npx skills add https://github.com/tamago0224/kuroshio-mta --skill golang-samber-lo-tamago0224
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-samber-lo
Source: https://github.com/tamago0224/kuroshio-mta/tree/main/.agents/skills/golang-samber-lo
Command: npx skills add https://github.com/tamago0224/kuroshio-mta --skill golang-samber-lo-tamago0224

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Go developers often reinvent boilerplate for data transforms, leading to boilerplate-heavy code that is hard to maintain. This Skill provides a comprehensive, type-safe set of functional helpers from samber/lo (and related packages) to accelerate data processing in Go.

Core Features & Use Cases

  • Core immutable package (lo) with 500+ functions for slices, maps, strings, math, channels, and concurrency, enabling declarative transforms.
  • Optional sub-packages for performance and ergonomics: parallel (lop) for CPU-bound parallelism, mutable (lom) for in-place mutations, lazy iterators (loi) for Go 1.23+ pipelines, and experimental SIMD (lo/exp/simd).
  • Use cases include building data pipelines with Map/Filter/GroupBy, performing transformations across collections, and interop with stdlib when possible.

Quick Start

Install via go get github.com/samber/lo and begin using lo.Map, lo.Filter, lo.GroupBy, and other helpers in your codebase; then progressively explore lop, lom, loi as needed.

Frequently Asked Questions about golang-samber-lo

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

FAQPage Schema
How do I reduce boilerplate for repetitive data transforms in Go?

Type-safe functional helpers like Map, Filter, and Reduce eliminate repetitive boilerplate for data transforms in Go by enabling declarative pipeline operations across slices and maps without writing custom loops.

What's the best way to build a functional data pipeline in Go?

Building a functional data pipeline in Go is best done with composable helpers for Map, Filter, GroupBy, and Chunk, allowing you to chain typed transformations declaratively rather than managing explicit iteration state.

Does samber/lo require a specific Go version for functional transforms?

Yes, functional transforms with samber/lo require Go 1.18 or later to leverage generics for type-safe data processing, while lazy iterator subpackages like loi require Go 1.23+ for pipeline operations.

Can I use parallel processing for CPU-bound Go transforms in samber/lo?

Yes, the optional lop subpackage provides parallel processing for CPU-bound Go transforms in samber/lo, enabling concurrent execution across collections when sequential functional operations become a bottleneck.

When should I use mutable versus immutable functional helpers in Go?

Use immutable helpers for safer declarative transforms that avoid side effects, and switch to the mutable lom subpackage when you need in-place mutations to optimize memory allocation during data processing.

Why do my Go data pipelines have high memory usage with large slices?

High memory usage in Go data pipelines often comes from allocating intermediate slices during transforms; using lazy iterators from the loi subpackage for Go 1.23+ can process elements on-demand to reduce allocation overhead.