kless/goconfig — pull request #3 by huandu (2013-01-17 07:34:59+00:00)
Title: Add SectionOptions method to return options only in a section.

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.