Ecosyste.ms: Packages

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

Top 8.9% dependent packages on proxy.golang.org

proxy.golang.org : go.kyoto.codes/zen/v3

Zen is a set of small utilities that you probably miss. It's a common situation when simple things drive you crazy like missing ternary operator, atomic operations that take at least 3 lines, dealing with complex loops due to missing map/filter, or having to deal with goroutines and synchronization even for simple things. Zen tries to solve it. Not solves, but definitely tries. It provides you with a number of small packages to make your work with Go easier. Let's look at a fairly common situation where you need to filter a slice. It's really annoying, isn't it? The language has no built-in capabilities for doing such operations inline. Let's see what it would look like with our package. Need to convert a slice of values to something different? Not a big deal. Just give a processing function to "slice.Map". Let's look at another example. Sometimes you run into situations where the structure takes a pointer to a simple type, like string. It's understandable, sometimes we need to take nil as one of the possible states. But if we will try to create a pointer from an inline value, we get an error. So you'll end up defining one more variable before creating the struct. Now you can sleep peacefully. Let's move on to the next example, which is very similar. They all look alike, don't they? Now, we will try to implement "default value". Of course, without any additional methods or wrappers it would look something like this. Our "logic" mini-package just makes our lives a little easier. Need some kind of async/await instead of managing mutexes by hand? Yep, sure. In addition to the above, the library contains many interesting things that go beyond a basic overview. First, check the library index to explore the proposed sub-packages. Each one has its own mini-documentation, its own index, and consists of well-documented types and functions. Zen has been trying to be modular since v3, so it now consists of sub-packages and does not provide anything from the root package, except the package overview.

Registry - Source - Documentation - JSON
purl: pkg:golang/go.kyoto.codes/zen/v3
Keywords: async, go, nethttp, utils
License: MIT
Latest release: 7 months ago
First release: over 1 year ago
Namespace: go.kyoto.codes/zen
Dependent packages: 2
Stars: 12 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 16 days ago

    Loading...
    Readme
    Loading...