Fix backward incompatibility for Set* methods (#213)
Patch #185 introduced a backward incompatibility by changing the arguments of the `Set*` methods on `Tree`. This change restores the arguments to what they previous were, and introduces `SetWithComment` and `SetPathWithComment` to perform the same action.
This commit is contained in:
+1
-1
@@ -47,7 +47,7 @@ func assertTree(t *testing.T, tree *Tree, err error, ref map[string]interface{})
|
||||
func TestCreateSubTree(t *testing.T) {
|
||||
tree := newTree()
|
||||
tree.createSubTree([]string{"a", "b", "c"}, Position{})
|
||||
tree.Set("a.b.c", "", false, 42)
|
||||
tree.Set("a.b.c", 42)
|
||||
if tree.Get("a.b.c") != 42 {
|
||||
t.Fail()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user