Rename TomlTree to Tree (#159)

Avoid stutter.

Fixes #55
This commit is contained in:
Thomas Pelletier
2017-05-10 17:53:23 -07:00
committed by GitHub
parent 23f644976a
commit 685a1f1cb7
20 changed files with 170 additions and 170 deletions
+4 -4
View File
@@ -99,13 +99,13 @@ func ExampleNodeFilterFn_filterExample() {
// define the filter, and assign it to the query
query.SetFilter("bazOnly", func(node interface{}) bool {
if tree, ok := node.(*toml.TomlTree); ok {
if tree, ok := node.(*toml.Tree); ok {
return tree.Has("baz")
}
return false // reject all other node types
})
// results contain only the 'struct_two' TomlTree
// results contain only the 'struct_two' Tree
query.Execute(tree)
}
@@ -147,8 +147,8 @@ func TestTomlQuery(t *testing.T) {
t.Errorf("Expected resultset of 1, got %d instead: %v", len(values), values)
}
if tt, ok := values[0].(*toml.TomlTree); !ok {
t.Errorf("Expected type of TomlTree: %T", values[0])
if tt, ok := values[0].(*toml.Tree); !ok {
t.Errorf("Expected type of Tree: %T", values[0])
} else if tt.Get("a") != int64(1) {
t.Errorf("Expected 'a' with a value 1: %v", tt.Get("a"))
} else if tt.Get("b") != int64(2) {