proxy.golang.org : github.com/schmidtw/goschtalt
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/schmidtw/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.
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/schmidtw/goschtalt
Keywords:
go
, golang
License: Apache-2.0
Latest release: 4 months ago
First release: over 2 years ago
Namespace: github.com/schmidtw
Dependent packages: 8
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: about 2 hours ago