You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How do I make it check errors (e.g. wrong fields or section names) when parsing the ini file?
Ideally clap-like suggestions should be shown when invalid name is close to some valid name.
The text was updated successfully, but these errors were encountered:
How do I make it check errors (e.g. wrong fields or section names) when parsing the ini file?
Ideally clap-like suggestions should be shown when invalid name is close to some valid name.
That is currently not implemented. The library only seeks to glue both rust-ini and clap under the same interface, with no additional features. So not sure if that's the goal here. But would some kind of hook that validates the INI config file be enough?
Something like:
let conf = ServerConfig::parse_with_validation(app,"config.ini", |ini, args| -> bool{/* ... */});
Where the function would be called before reading the arguments/INI into the config file?
Expected high-level API should be similar to the non-validating one: just ask for info and automatically provide error message to user in case of problems.
It should work just like Clap's validation and auto-suggestion of command line arguments, but also for INI instream of CLI.
How do I make it check errors (e.g. wrong fields or section names) when parsing the ini file?
Ideally clap-like suggestions should be shown when invalid name is close to some valid name.
The text was updated successfully, but these errors were encountered: