moonfig-toml

    TOML adapter for MuVirus/moonfig.

    config
    toml
    moonfig
    Download zip
    Author
    Version
    0.2.0
    License
    Apache-2.0
    Last updated
    17 hours ago
    Downloads
    10

    #moonfig-toml

    TOML adapter for moonfig. It turns a TOML document into moonfig's Value, so merging, extraction and validation work exactly like they do for every other format.

    This lives in its own module so that moon add MuVirus/moonfig does not drag in the TOML parser. Add it only when you actually read TOML.

    #Install

    moon add MuVirus/moonfig-toml

    import {
    "MuVirus/moonfig/core" @config,
    "MuVirus/moonfig-toml/toml_format" @tomlfmt,
    }

    let cfg = @config.Config::new()
    .add(@config.StringSource::new("port = 5432", @tomlfmt.TomlFormat::new()))
    .build()