slicy
pie
Our great sponsors
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
slicy
-
When to Use Generics
My personal experience with generics was to port a parallel circular queue library (used to take interface{} and require a type cast at every use) add an experiment to build all the Lodash slice and collection functions in Go.
Happy to say that both worked really well. Took me less than an hour to understand the system enough for these purposes, and the implementation hides neatly in the library - the code that uses the library has absolutely no mention of anything generic. Having generics also helped switch to cleaner implementation inside as well, because I could now use maps as well without type casts.
Looks like a solid useful system - I could do everything I wanted, all the complexity stays in the library, and changes were pretty minimal and easy to understand. Would recommend.
https://github.com/sudhirj/cirque
https://github.com/sudhirj/slicy
- Generic slice/collection utility methods for Go
pie
-
Generic slice utils? I just created
How does this library differ from lo or pie?
-
remove element from a slice
otherwise, this library might do what you want https://github.com/elliotchance/pie
-
Go: Don't Change the Libraries in 1.18
I don't know how people were looking at these Java 2.0-esque kludges and still arguing generics were superfluous but I'm glad it's landed: https://github.com/elliotchance/pie
What are some alternatives?
slice - Type-safe functions for common Go slice operations
lo - 💥 A Lodash-style Go library based on Go 1.18+ Generics (map, filter, contains, find...)
Koazee - A StreamLike, Immutable, Lazy Loading and smart Golang Library to deal with slices.
slicesol
rzgrep - grep utility that searches through zip,jar,ear,tgz,bz2 in any form of nesting; it can also decompile class files
slicer - Utility class for handling slices
cirque - A circular queue that processes jobs in parallel but returns results in FIFO
linq-in-go - LINQ to Objects in Go by generic higher order functions
go - The Go programming language
async - experimental promises in go1.18 with generics
pjson - Helps to easily JSON marshal / unmarshal tagged unions in go