feat: add field comments, local time zone decoding and in-value cancellation
Test / test (push) Successful in 1m32s
Test / test (push) Successful in 1m32s
Assisted-by: GLM 5.3 Flash
This commit is contained in:
@@ -49,6 +49,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- `ParseAs[T](data)`, the generic one-line decode, and `NewSchema[T]()`,
|
||||
which precompiles the struct schema and the interface flags for a hot path
|
||||
before the first document arrives.
|
||||
- `Encoder.EmitFieldComments()` prints the comment a field's `toml` tag
|
||||
carries in a `comment=` option above the field's line or header, the
|
||||
comments a round trip through the Go type would otherwise drop. Go doc
|
||||
comments are not visible to reflection, so the tag is the channel that
|
||||
carries the text.
|
||||
- `Decoder.LocalTimeLocation(loc)` lets a local date-time fill a plain
|
||||
`time.Time` destination in the location given, relabelled rather than
|
||||
shifted: `07:32` in the document is `07:32` in the zone. Without the
|
||||
option the wrapper types remain the only destinations a local kind fills.
|
||||
- The parse checks its context inside a value as well as between statements:
|
||||
an array, an inline table and a multi-line string check every 64 elements
|
||||
or lines, so one huge value cannot hold the parse past its cancellation.
|
||||
- `OrderedMap`, the string-keyed table that remembers the order its keys were
|
||||
set in: decoding into one fills it in the order the document wrote the
|
||||
keys, and `Marshal` writes one back in that order, where a map carries no
|
||||
|
||||
Reference in New Issue
Block a user