Skip to content

alecthomas/kong-toml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TOML Configuration Loader for Kong

Usage:

kctx := kong.Parse(&cli, kong.Configuration(kongtoml.Loader, ".app.toml", "~/.app.toml"))

Configuration mapping

Mapping is achieved by normalising both flags and configuration entries to hyphen-separated keys.

eg. the flag ftl init go --no-hermit will be mapped to the configuration key init-go-no-hermit = true, with fallback to no-hermit = true.

TOML sections are prefixed to attributes via concatenation with -. eg.

["init go"]
no-hermit = true

Will be mapped to init-go-no-hermit = true

About

Kong configuration loader for TOML

Resources

License

Stars

Watchers

Forks

Packages

No packages published