Fix plural mistake in Set* docs (#154)

This commit is contained in:
Kevin Burke
2017-05-03 21:03:14 -07:00
committed by Thomas Pelletier
parent 76c552dcd7
commit 97253b98df
+2 -2
View File
@@ -171,14 +171,14 @@ func (t *TomlTree) GetDefault(key string, def interface{}) interface{} {
// Set an element in the tree.
// Key is a dot-separated path (e.g. a.b.c).
// Creates all necessary intermediates trees, if needed.
// Creates all necessary intermediate trees, if needed.
func (t *TomlTree) Set(key string, value interface{}) {
t.SetPath(strings.Split(key, "."), value)
}
// SetPath sets an element in the tree.
// Keys is an array of path elements (e.g. {"a","b","c"}).
// Creates all necessary intermediates trees, if needed.
// Creates all necessary intermediate trees, if needed.
func (t *TomlTree) SetPath(keys []string, value interface{}) {
subtree := t
for _, intermediateKey := range keys[:len(keys)-1] {