kalgan-config

Collection of functions to retrieve data and settings parameters defined in yaml files used by Kalgan Framework.

Examples

This is the yaml file to be used in the following tests: ```yaml

tests/settings.yaml

user: name: John isreal: false age: 39 height: 1.78 children: - Huey - Dewey - Louie rust use kalganconfig::Config;

let config: Config = Config::new("tests/settings.yaml"); rust asserteq!(config.get("user.name").unwrap(), "John"); rust asserteq!(config.getstring("user.name").unwrap(), "John".tostring()); rust asserteq!(config.getbool("user.isreal").unwrap(), false); rust asserteq!(config.getnumber("user.age").unwrap(), 39); rust asserteq!(config.getfloat("user.height").unwrap(), 1.78); rust asserteq!(config.get_vec("user.children").unwrap(), vec!["Huey", "Dewey", "Louie"]); ```

Documentation

For further information please visit:

License

This crate is licensed under either of the following licenses: