Collection of functions to retrieve data and settings parameters defined in yaml files used by Kalgan Framework.
This is the yaml file to be used in the following tests: ```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"]);
```
For further information please visit:
This crate is licensed under either of the following licenses: