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

Top 8.2% on proxy.golang.org

proxy.golang.org : github.com/halprin/rangechain

Package rangechain chains together lazily computed modifications to range-able containers. E.g. slices, arrays, maps, and channels. To start the chain, use the `From*` functions. They take a range-able container, and you'll pick the appropriate one for the type of container. From there, one can call a plethora of additional methods to modify the container passed in originally. The methods are outlined below. The methods fall into one of two categories: chaining or terminating. Because Go does not support generics (yet), this library operates using `interface{}`. One using this library may need to use type assertions. For example, something like `actualValue := value.(int)`. For another example... Notice `stringValue := value.(string)` above. This allows one to do the string concatenation on the next line because the `+` operator doesn't work on an `interface{}` type. Chaining methods apply some modification to the values in the container values, but keeps the chain alive. This allows additional chaining methods to be subsequently called on the result. The subsequent chain methods operate on any changes performed by the previous chain method. Because modifications are lazily computed, none of the modifications from chaining methods are applied until _after_ a terminating method is called. Terminating methods also apply some modification, requests some information, or executes something on the values. They stop the chaining by returning an actual value. This value will depend on all the previous chaining methods being executed first.

Registry - Source - Documentation - JSON - codemeta.json
purl: pkg:golang/github.com/halprin/rangechain
License: MIT
Latest release: about 4 years ago
First release: about 4 years ago
Namespace: github.com/halprin
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 13 days ago

    Loading...
    Readme
    Loading...