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

Top 5.9% on proxy.golang.org

proxy.golang.org : github.com/thediveo/deafadder

Package deafadder wraps koanf.Koanf configuration data objects, adding convenience accessor functions for pflag configuration data types. Suppose you have developed a service or CLI tool using cobra and pflag to parse and handle CLI flags. Sweet and easy. Next, you want to support further configuration data sources, such as configuration files, opting for the koanf module(s). This assumes that in your service/CLI tool code base you are using the pflag.FlagSet flag value accessor functions, and not directly accessing the underlying flag values directly. Here, the deafadder module comes in: in order to make this upgrade as simple and painless as possible without having to throw away all the pflag-related code, you basically just swap in the pflag value-compatible accessor code from the DeafAdder object, which is a simple wrapper for koanf.Koanf objects. The name “deafadder” (“anguis fragilis sensu stricto”, better known as “slowworm”) is a pun on the Go cobra and viper modules: it refers to a species of legless lizard native to western Eurasia. Under its hood (or rather, skin) this package leverages the conversion functions implemented in the pflag package, inheriting its behavior but also some quirks. For instance, DeafAdder.GetIP currently does not report any errors in case of invalid textual IP addresses.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/thediveo/deafadder
License: Apache-2.0
Latest release: 4 months ago
First release: 4 months ago
Namespace: github.com/thediveo
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 7 days ago

    Loading...
    Readme
    Loading...