Browse Source

add Keys method to Section

pull/16/head
Brett Langdon 11 years ago
parent
commit
d81a1640c9
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      section.go

+ 10
- 0
section.go View File

@ -190,6 +190,16 @@ func (section *Section) HasParent() bool {
return section.parent != nil
}
// Keys will return back a list of all setting names in this Section
func (section *Section) Keys() []string {
keys := make([]string, 0)
for key, _ := range section.values {
keys = append(keys, key)
}
return keys
}
// Set will set a value (Primative or Section) to the provided name
func (section *Section) Set(name string, value Value) {
section.values[name] = value


Loading…
Cancel
Save