summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/pelletier/go-toml/tomltree_create.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/pelletier/go-toml/tomltree_create.go')
-rw-r--r--vendor/github.com/pelletier/go-toml/tomltree_create.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/vendor/github.com/pelletier/go-toml/tomltree_create.go b/vendor/github.com/pelletier/go-toml/tomltree_create.go
index c6054f358..ee7114ed8 100644
--- a/vendor/github.com/pelletier/go-toml/tomltree_create.go
+++ b/vendor/github.com/pelletier/go-toml/tomltree_create.go
@@ -51,7 +51,7 @@ func simpleValueCoercion(object interface{}) (interface{}, error) {
case fmt.Stringer:
return original.String(), nil
default:
- return nil, fmt.Errorf("cannot convert type %T to TomlTree", object)
+ return nil, fmt.Errorf("cannot convert type %T to Tree", object)
}
}
@@ -59,7 +59,7 @@ func sliceToTree(object interface{}) (interface{}, error) {
// arrays are a bit tricky, since they can represent either a
// collection of simple values, which is represented by one
// *tomlValue, or an array of tables, which is represented by an
- // array of *TomlTree.
+ // array of *Tree.
// holding the assumption that this function is called from toTree only when value.Kind() is Array or Slice
value := reflect.ValueOf(object)
@@ -70,14 +70,14 @@ func sliceToTree(object interface{}) (interface{}, error) {
}
if insideType.Kind() == reflect.Map {
// this is considered as an array of tables
- tablesArray := make([]*TomlTree, 0, length)
+ tablesArray := make([]*Tree, 0, length)
for i := 0; i < length; i++ {
table := value.Index(i)
tree, err := toTree(table.Interface())
if err != nil {
return nil, err
}
- tablesArray = append(tablesArray, tree.(*TomlTree))
+ tablesArray = append(tablesArray, tree.(*Tree))
}
return tablesArray, nil
}
@@ -120,7 +120,7 @@ func toTree(object interface{}) (interface{}, error) {
}
values[key.String()] = newValue
}
- return &TomlTree{values, Position{}}, nil
+ return &Tree{values, Position{}}, nil
}
if value.Kind() == reflect.Array || value.Kind() == reflect.Slice {