github.com/goschtalt/goschtalt (go): Package goschtalt is a lightweight and flexible configuration registry that makes it easy to configure an application.  Goschtalt is a fresh take on application configuration now that Go has improved filesystem abstraction, modules, and the Option pattern.  At its core, Goschtalt is a low dependency library that provides configuration values via a small and customizable API.  The configuration values can be merged using either the default semantics or specified on a parameter by parameter basis.  The project contains several packages that are versioned together, but are otherwise independent (different go modules).  They can be found here:  https://github.com/goschtalt/goschtalt/tree/main/extensions/  For most of the decoders you can specify instructions for goschtalt's handling of the data fields by annotating the key portion.  Here's a simple example in yaml:  If this configuration data is merged with an existing configuration set:  The resulting configuration will be:  The commands available are consistent, but vary based on the type of the value being defined.  All types (maps, arrays, values) support:  Maps support the following instructions:  Arrays support the following instructions:  Default merging behaviors:  An example showing using a secret:  The order of the instructions doesn't matter, nor does extra spaces around the instructions.  You may comma separate them, or you may just use a space. But you can only have one or two instructions (one MUST be secret if there are two.  Secrets are primarily there so that if you want to output your configuration and everything is marked as secret correctly, you can get a redacted configuration file with minimal work.  It's also handy if you output your configuration values into a log so you don't accidentally leak your secrets.  Examples of decoders exist in the extensions/decoders directory.  Of interest are the `env` decoder that provides an Option, and the `yaml` decoder that is simply a decoder.  In psychology, gestalt is a way of thinking about data via patterns and configuration.  It's a also somewhat common word.  gostalt is pretty good, except there were still several things that used it, including a go framework. This goschtalt project is the only response google returned as of Aug 12, 2022.
Keywords: go|golang