Skip to content
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

Add an option to return error when value is missing #107

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

WindSoilder
Copy link

@WindSoilder WindSoilder commented Jun 13, 2023

Fixes: #106

To implement the feature, I think it'd be great to have an option to control the behavior(Just like python's config parser's allow_no_value option)

@WindSoilder WindSoilder changed the title return error when value is missing Add an option to return error when value is missing Jun 13, 2023
}

impl Default for ParseOption {
fn default() -> ParseOption {
ParseOption {
enabled_quote: true,
enabled_escape: true,
dont_allow_no_value: true,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be false by default.

@zonyitoo
Copy link
Owner

How about

[Section]
Key=

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maybe it should returns error when there are lines without =
2 participants