Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 7.7% on proxy.golang.org
Top 4.8% dependent repos on proxy.golang.org
Top 9.8% forks on proxy.golang.org

proxy.golang.org : github.com/marstr/collection/v2

Package collection seeks to provide an expressive and readable way of working with basic data structures in Go. As a former .NET developer, I deeply missed writing programs in the style of Linq. Doing so enables concurrent/ parallel reactive programs to be written in a snap. Go's functional nature enables us to have a very similar, if more verbose, experience. Take for example the scenario of printing the number of Go source files in a directory. Using this package, this takes only a few lines: A directory is a collection of filesystem entries, so we're able to iterate through them using the "Enumerate" function. From there, we filter on only file names that end with ".go". Finally, we print the number of entries that were encountered. This is a trivial example, but imagine building more elaborate pipelines. Maybe take advantage of the `SelectParallel` function which allows multiple goroutines to process a single transform at once, with their results being funnelled into the next phase of the pipeline. Suddenly, injecting new steps can be transparent.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/marstr/collection/v2
Keywords: collections, dictionary, generics, go, golang, linkedlist, linq, lrucache, queue, stack
License: MIT
Latest release: over 2 years ago
First release: over 2 years ago
Namespace: github.com/marstr/collection
Dependent repositories: 1
Stars: 23 on GitHub
Forks: 3 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 16 days ago

    Loading...
    Readme
    Loading...