Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. lo

lo

MITGov1.53.0

A Lodash-style Go utility library based on Go 1.18+ generics for working with slices, maps, channels, and functions.

Visit WebsiteGitHubGitHub
21.4k stars946 forks0 contributors

What is lo?

Lo is a comprehensive utility library for Go that provides dozens of synchronous helper functions for manipulating slices, maps, strings, channels, and functions. Inspired by Lodash, it leverages Go 1.18+ generics to offer type-safe operations that simplify common coding tasks and improve code readability. It focuses on synchronous helpers for finite sequences while maintaining zero dependencies outside the Go standard library.

Target Audience

Go developers working with Go 1.18+ who need expressive, type-safe utilities for data manipulation, particularly those familiar with Lodash-style functional programming patterns. It's especially useful for developers handling collections, concurrency patterns, and string transformations in their applications.

Value Proposition

Developers choose Lo for its extensive collection of type-safe, generic utilities that bring Lodash-like expressiveness to Go, combined with zero external dependencies. Its unique selling point is providing dozens of synchronous helpers across multiple data types (slices, maps, strings, channels) with full generics support, plus specialized packages for parallel processing, mutable operations, and iteration.

Overview

💥 A Lodash-style Go library based on Go 1.18+ Generics (map, filter, contains, find...)

Use Cases

Best For

  • Transforming and querying collections with functional operations like Map, Filter, Reduce, and GroupBy
  • Implementing concurrency patterns with utilities like ChannelDispatcher, FanIn, FanOut, and parallel processing variants
  • Manipulating strings with case conversion (CamelCase, SnakeCase), truncation, chunking, and word splitting
  • Handling errors in collection operations with integrated error propagation in functions like MapErr, FilterErr, and Try
  • Working with tuples and zipping multiple collections together using T2-T9, Zip2-Zip9, and related helpers
  • Performing mathematical operations on collections with Sum, Product, Mean, Mode, and Range functions

Not Ideal For

  • Projects stuck on Go versions below 1.18 due to its reliance on generics
  • Applications processing infinite data streams or event-driven architectures better served by reactive libraries like samber/ro
  • Codebases needing only basic slice/map operations where Go's standard slices and maps packages suffice
  • Environments where minimizing code bulk is critical, as Lo adds hundreds of functions even with zero dependencies

Pros & Cons

Pros

Type-Safe Generics Support

Leverages Go 1.18+ generics for compile-time type checking across all operations, ensuring safety and reducing runtime errors, as evidenced by functions like Map and Filter that work with any type.

Comprehensive Error Handling

Integrates error propagation directly into collection functions like MapErr and FilterErr, allowing robust operations without breaking the functional programming flow, which is detailed in the README examples.

Concurrency and Parallel Utilities

Includes helpers such as ChannelDispatcher, FanIn, and parallel processing variants in the lo/parallel package, facilitating goroutine-safe operations and efficient data processing for concurrent scenarios.

Zero External Dependencies

Maintains no dependencies outside the Go standard library, simplifying integration and reducing dependency management overhead, as stated in the installation and philosophy sections.

Cons

Redundancy with Standard Library

The README admits that 5-10 helpers overlap with Go's slices and maps packages, which can lead to confusion or unnecessary code duplication for developers already using standard library functions.

Mutable Operations Risks

Functions in lo/mutable, like Shuffle and Reverse, modify slices in place, increasing the risk of unintended side effects and bugs if not handled carefully, as highlighted in the mutable examples.

Steep API Learning Curve

With over a hundred functions across slices, maps, strings, and more, the extensive API can be overwhelming for newcomers and may introduce complexity in projects that only need a subset of features.

Open Source Alternative To

lo is an open-source alternative to the following products:

Lodash
Lodash

Lodash is a popular JavaScript utility library that provides consistent, modular functions for common programming tasks like array manipulation, object iteration, and function composition.

Frequently Asked Questions

Quick Stats

Stars21,394
Forks946
Contributors0
Open Issues121
Last commit17 hours ago
CreatedSince 2022

Tags

#functional-programming#typesafe#go-generics#utility-library#lodash#error-handling#golang#type-safe#generics#programming#concurrency#collection-helpers#go#functional#constraints

Built With

G
Go

Links & Resources

Website

Included in

Go169.1k
Auto-fetched 3 hours ago

Related Projects

fzffzf

:cherry_blossom: A command-line fuzzy finder

Stars81,940
Forks2,820
Last commit19 hours ago
divedive

A tool for exploring each layer in a docker image

Stars54,353
Forks1,991
Last commit7 months ago
HubHub

A command-line tool that makes git easier to use with GitHub.

Stars22,957
Forks2,222
Last commit2 years ago
ctopctop

Top-like interface for container metrics

Stars17,799
Forks589
Last commit2 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub