-
Notifications
You must be signed in to change notification settings - Fork 242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bad things happen if [general]
is missing
#292
Comments
It is generally hard to do what you request. Config files are read to find values that override default ones. To detect extra-numerous keys requires to have a schema of the configuration and validate any input against this schema. But a INI is « open » by nature. |
OK: how about make |
Aha, it is possible: see "Example (StrictDecoding)" at https://godocs.io/github.com/BurntSushi/toml Something like this should do the trick:
|
Abort on unrecognized options or if general.domain is missing Fixes joohoi#292
I found this out the hard way... I couldn't understand why acme-dns was trying to do weird stuff, like use the root domain, and then crashing:
It turns out that due to a copy-paste error I'd missed
[general]
from the top of the config file. D'oh!It would be very helpful if the config parser rejected unexpected or bad settings.
The text was updated successfully, but these errors were encountered: