Rework tree from map (#139)
* Make TreeFromMap reflect to construct tree * Fix wording of invalid value type in writeTo Fixes #138, #139, #134 ⚠️ TreeFromMap signature changed to `TreeFromMap(map[string]interface{}) (*TomlTree, error)`
This commit is contained in:
@@ -146,7 +146,7 @@ func TestTomlTreeWriteToMapSimple(t *testing.T) {
|
||||
func TestTomlTreeWriteToInvalidTreeSimpleValue(t *testing.T) {
|
||||
tree := TomlTree{values: map[string]interface{}{"foo": int8(1)}}
|
||||
_, err := tree.ToTomlString()
|
||||
assertErrorString(t, "invalid key type at foo: int8", err)
|
||||
assertErrorString(t, "invalid value type at foo: int8", err)
|
||||
}
|
||||
|
||||
func TestTomlTreeWriteToInvalidTreeTomlValue(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user