Ecosyste.ms: Packages

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

Top 7.6% on proxy.golang.org

proxy.golang.org : github.com/iph0/conf/v2

Module conf is an extensible solution for cascading configuration. Module conf provides the configuration processor, that can load configuration layers from different sources and merges them into the one configuration tree. Module conf comes with built-in configuration loaders fileconf and envconf, and can be extended by third-party configuration loaders. Module conf do not watch for configuration changes, but you can implement this feature in the custom configuration loader. Configuration processor in conf module supports processing directives $include, $ref, $underlay and $overlay. See more information about directives below. Configuration processor can include additional configuration sections to main configuration tree from external sources using $include directive. $include directives applies before the process of merging of configuration layers. $include directive accepts a list of configuration locators as a value. Configuration processor can expand references, that can be specified in string values, to configuration parameters within the same configuration tree (if you need references to configuration sections, see $ref directive). To escape expansion of references, add one more "$" symbol. For example: Configuration processor supports internal references to configuration parameters within the same configuration tree using $ref directive. $ref directive can take three forms. The first form of the $ref directive just tries to get a value by name. The second form of the $ref directive tries to get a value by name and if no value is found, uses default one. The third form of the $ref directive tries to get a first defined value, if no value is found, uses default one. Default value in second and third forms can be omitted. Configuration processor supports internal merges between configuration sections within the same configuration tree using $underlay and $overlay directives. Both directives accept a parameter name or a list of parameter names as a value. $underlay directive retrieves configuration sections by parameter names, merges them between each other in the order in which the names was specified and places the result under the configuration section where $underlay directive was specified. $overlay directive retrieves configuration sections by parameter names, merges them between each other in the order in which the names was specified and overlays the result on the configuration section where $overlay directive was specified.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/iph0/conf/v2
Keywords: cascading, conf, config, go, golang, interpolation
License: MIT
Latest release: 21 days ago
Namespace: github.com/iph0/conf
Stars: 2 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 21 days ago