Skip to content

Conversation

@huandu
Copy link

@huandu huandu commented Jan 17, 2013

Here is a scenario to use SectionOptions.

I have several features in my app. Each feature can have a name like "feature1". With SectionOptions, I can write config file as following.

[features]
feature1 = on
feature2 = off
feature3 = on
# and more...

In my code, I can just enumerate section "features" to find out which feature should be turned on, instead of enumerate all possible features and see whether config file contains the feature name.

tredoe pushed a commit that referenced this pull request Jan 24, 2013
Add SectionOptions method to return options only in a section.
@tredoe tredoe merged commit 0f6960b into robfig:master Jan 24, 2013
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.

2 participants