cue-exp / cueconfig

Package cueconfig provides an API designed to make it straightforward to use the CUE language as a configuration format for Go programs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cueconfig: use CUE to configure your Go programs

Package cueconfig provides an API designed to make it straightforward to use the CUE language as a configuration format for Go programs.

It provides a single entry point, Load, which is very roughly equivalent to json.Unmarshal. It loads a configuration file (or directory) from disk and unmarshals it into a Go value.

Optionally, Load can be provided with a CUE schema to verify the configuration before unmarshaling into the Go value, a set of default values to apply after any user-specified defaults, and some runtime-defined values to be made available to the configuration.

There is a full example in the package documentation.

Issue tracking

Please raise all issues in the main CUE repository, giving the title of the issue a cueconfig: prefix.

About

Package cueconfig provides an API designed to make it straightforward to use the CUE language as a configuration format for Go programs.

License:Apache License 2.0


Languages

Language:Go 96.7%Language:CUE 3.3%