Skip to content

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

License

Notifications You must be signed in to change notification settings

cue-exp/cueconfig

Repository files navigation

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.

Resources

License

Stars

Watchers

Forks

Packages

No packages published