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

github.com/benbjohnson/immutable

Package immutable provides immutable collection types. Immutable collections provide an efficient, safe way to share collections of data while minimizing locks. The collections in this package provide List, Map, and SortedMap implementations. These act similarly to slices and maps, respectively, except that altering a collection returns a new copy of the collection with that change. Because collections are unable to change, they are safe for multiple goroutines to read from at the same time without a mutex. However, these types of collections come with increased CPU & memory usage as compared with Go's built-in collection types so please evaluate for your specific use. The List type provides an API similar to Go slices. They allow appending, prepending, and updating of elements. Elements can also be fetched by index or iterated over using a ListIterator. The Map & SortedMap types provide an API similar to Go maps. They allow values to be assigned to unique keys and allow for the deletion of keys. Values can be fetched by key and key/value pairs can be iterated over using the appropriate iterator type. Both map types provide the same API. The SortedMap, however, provides iteration over sorted keys while the Map provides iteration over unsorted keys. Maps improved performance and memory usage as compared to SortedMaps. Map types require the use of a Hasher implementation to calculate hashes for their keys and check for key equality. SortedMaps require the use of a Comparer implementation to sort keys in the map. These collection types automatically provide built-in hasher and comparers for int, string, and byte slice keys. If you are using one of these key types then simply pass a nil into the constructor. Otherwise you will need to implement a custom Hasher or Comparer type. Please see the provided implementations for reference.

Ecosystem
proxy.golang.org
Latest Release
v0.4.3
about 3 years ago
Versions
9
Dependent Packages
307
Dependent Repos
1,128
v0.4.3
Published: about 3 years ago
Registry - Documentation - Download
v0.4.2
Published: about 3 years ago
Registry - Documentation - Download
v0.4.1
Published: about 3 years ago
Registry - Documentation - Download
v0.4.0
Published: over 3 years ago
Registry - Documentation - Download
v0.3.0
Published: over 5 years ago
Registry - Documentation - Download
v0.2.1
Published: over 5 years ago
Registry - Documentation - Download
v0.2.0
Published: about 7 years ago
Registry - Documentation - Download
v0.1.1
Published: about 7 years ago
Registry - Documentation - Download
v0.1.0
Published: about 7 years ago
Registry - Documentation - Download
Links
Registry proxy.golang.org
Source Repository
Docs Documentation
JSON API View JSON
CodeMeta codemeta.json
Package Details
PURL pkg:golang/github.com/benbjohnson/immutable
spec
License MIT
Namespace github.com/benbjohnson
First Release about 7 years ago
Last Synced about 20 hours ago
Repository
Stars 731 on GitHub
Forks 36 on GitHub
Docker Dependents 93
Docker Downloads 2,127,863,066
Commits 53
Committers 8
Avg per Author 6.625
DDS 0.528
Rankings on proxy.golang.org
Overall Top 1.5%
Dependent packages Top 0.3%
Dependent repos Top 0.2%
Forks Top 4.3%
Docker downloads Top 0.1%