Rewrite TomlTree encoding (#133)

* Rewrite `TomlTree` encoding
* Introduce `TomlTree.WriteTo`
This commit is contained in:
Thomas Pelletier
2017-03-02 09:17:06 -08:00
committed by GitHub
parent 3616783228
commit 7e6e4b1314
5 changed files with 331 additions and 279 deletions
+2 -2
View File
@@ -10,13 +10,13 @@ import (
)
type tomlValue struct {
value interface{}
value interface{} // string, int64, uint64, float64, bool, time.Time, [] of any of this list
position Position
}
// TomlTree is the result of the parsing of a TOML file.
type TomlTree struct {
values map[string]interface{}
values map[string]interface{} // string -> *tomlValue, *TomlTree, []*TomlTree
position Position
}