Assisted-by: DeepSeek V4.1 Flash
This commit is contained in:
@@ -28,6 +28,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
at most `threshold` bytes is written as an inline table instead of a header
|
||||
section, which shortens a document of small tables. An array of tables keeps
|
||||
its header form, because its inline form would re-parse as a value array.
|
||||
- `Document` and `ParseMap`: `Parse` now returns a `*Document`, which holds the
|
||||
values together with the key order, whether a table was written as an inline
|
||||
table or under a header, and the comments, with `Keys`, `Entries`, `Get`,
|
||||
`Comments` and `SetComments` to read and write them. `ParseMap` returns the
|
||||
plain `map[string]any` tree, the shape `Parse` used to give. `Marshal` does
|
||||
not accept a `Document`; it writes values, so `doc.Map()` is the way through.
|
||||
- `OffsetDateTime`, the Go type of the offset date-time kind, so that all four
|
||||
TOML date-time kinds have one of their own. `Parse` and `Unmarshal` hand it
|
||||
back where they produced a bare `time.Time` before, and `Marshal` accepts it.
|
||||
|
||||
Reference in New Issue
Block a user