Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

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

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. gogu

gogu

MITGov1.0.3

A concurrent-safe Go generics utility library providing comprehensive functions and data structures for slices, maps, and strings.

GitHubGitHub
110 stars9 forks0 contributors

What is gogu?

Gogu is a versatile utility library for Go that leverages generics to offer a wide range of concurrent-safe functions and data structures. It simplifies common programming tasks by providing efficient operations for slices, maps, and strings, inspired by established frameworks like lodash and Apache Commons.

Target Audience

Go developers who need a comprehensive, concurrent-safe utility library for everyday tasks involving collections, strings, and data structures, especially those transitioning from languages with rich utility ecosystems.

Value Proposition

Developers choose Gogu for its combination of Go generics, concurrent safety for most operations, and extensive coverage of utility functions and data structures, offering a functional programming style while maintaining idiomatic Go performance and simplicity.

Overview

A comprehensive, reusable and efficient concurrent-safe generics utility functions and data structures library.

Use Cases

Best For

  • Implementing functional programming patterns like map, filter, and reduce on slices and maps in Go.
  • Managing asynchronous operations with utilities like debounce, memoize, retry, and delay.
  • Performing complex string manipulations such as case conversion, padding, wrapping, and substring extraction.
  • Working with common data structures like binary search trees, B-trees, caches, heaps, linked lists, queues, stacks, and tries in a generic, type-safe manner.
  • Handling collection operations such as chunking, flattening, grouping, union, intersection, and difference on slices and maps.
  • Caching expensive function results with memoization to improve application performance.

Not Ideal For

  • Projects requiring concurrent-safe B-tree operations, as Gogu's B-tree package explicitly lacks concurrency support.
  • Teams already using established Go utility libraries like samber/lo or go-funk, where switching adds migration overhead without clear advantages.
  • Applications with minimal utility needs or strict binary size constraints, where Gogu's comprehensive functionality could introduce unnecessary bloat.
  • Scenarios needing niche or advanced algorithms beyond common data structures, such as graph processing or machine learning utilities.

Pros & Cons

Pros

Comprehensive Functionality

Gogu offers an extensive range of utility functions for slices, maps, and strings, including operations like Filter, Map, Reduce, and string manipulations such as CamelCase and Pad, as detailed in the README's function lists.

Concurrency Safety

Most operations are designed to be concurrent-safe, a key feature highlighted in the README, making it suitable for multi-threaded Go applications without extra synchronization efforts.

Generics Integration

Leverages Go generics to provide type-safe operations, evident in functions like Map[T1, T2 any], which reduces runtime errors and improves code clarity for modern Go development.

High Test Coverage

Maintains 93.8% test coverage, as shown by the coverage badge, ensuring reliability and stability for production use with thorough documentation and examples.

Cons

B-Tree Concurrency Gap

The B-tree package is not concurrent-safe, which is a significant limitation for a library emphasizing concurrency, as admitted in the README, potentially requiring custom synchronization in concurrent environments.

API Complexity

With over 100 functions across multiple categories, the learning curve can be steep, and developers may find it challenging to navigate or select appropriate functions efficiently.

Potential Performance Trade-offs

Being a general-purpose library, some generic implementations might introduce overhead compared to hand-optimized, specific code, especially for performance-critical applications where fine-tuning is essential.

Frequently Asked Questions

Quick Stats

Stars110
Forks9
Contributors0
Open Issues1
Last commit3 years ago
CreatedSince 2022

Tags

#functional-programming#trie#slices#concurrent-safe#data-structures#utility-library#golang#maps#generics#programming#datastructures#go#algorithms#strings#functional

Built With

G
Go

Included in

Go169.1k
Auto-fetched 18 hours ago

Related Projects

gotagota

Gota: DataFrames and data wrangling in Go (Golang)

Stars3,269
Forks290
Last commit3 years ago
hyperlogloghyperloglog

HyperLogLog with lots of sugar (Sparse, LogLog-Beta bias correction and TailCut space reduction) brought to you by Axiom

Stars1,045
Forks84
Last commit7 months ago
go-geoindexgo-geoindex

Go native library for fast point tracking and K-Nearest queries

Stars361
Forks46
Last commit8 years ago
go-rquadgo-rquad

:pushpin: State of the art point location and neighbour finding algorithms for region quadtrees, in Go

Stars141
Forks9
Last commit4 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