Fixes #35: Retrieve dotted keys

This commit is contained in:
Thomas Pelletier
2015-07-14 20:15:02 -07:00
parent 41a8959f14
commit 209315c2af
+5 -1
View File
@@ -65,7 +65,11 @@ func (t *TomlTree) Get(key string) interface{} {
if key == "" {
return t
}
return t.GetPath(strings.Split(key, "."))
comps, err := parseKey(key)
if err != nil {
return nil
}
return t.GetPath(comps)
}
// GetPath returns the element in the tree indicated by 'keys'.