docs: align every document with the reviewed behaviour
Assisted-by: GLM 5.3
This commit is contained in:
+16
-1
@@ -155,7 +155,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
interface, or a nil or empty slice, array or map. In 1.x the option covered
|
||||
only the collections.
|
||||
- The `toml` tag gained the `inline` option: a struct or map field tagged
|
||||
`toml:"retry,inline"` emits as `retry = {…}` instead of a header section,
|
||||
`toml:"retry,inline"` emits as `retry = {â¦}` instead of a header section,
|
||||
whatever its size, a named embedded struct included. Forcing it on an array
|
||||
of tables is an error, because the inline form would re-parse as a value
|
||||
array and change the value's Go type.
|
||||
@@ -239,6 +239,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- A top-level value the encoder could not normalise reported its path with
|
||||
a leading dot, `interpres: .port: ...`; the message now reads
|
||||
`interpres: port: ...`, the shape `EncodeError.Path` already used.
|
||||
- A token shaped like a date-time with a component out of range, such as an
|
||||
hour of 24 or a February the 30th, fell through to the number decoder and
|
||||
failed with the number complaint `invalid character "-" in number`; it now
|
||||
fails as the date-time it visibly is, `invalid date-time "..."`.
|
||||
- A `time.Time` or `OffsetDateTime` whose zone offset is not a whole number
|
||||
of minutes wrote only the minutes, silently shifting the instant by the
|
||||
seconds dropped; the encoder now refuses such an offset, which TOML has no
|
||||
form for, instead of corrupting the value.
|
||||
- An empty array of tables over pointer elements, `[]*T{}`, emitted as
|
||||
`key = []` while its value form was omitted; it is omitted too now, the
|
||||
rule TOML forces, because an empty `[[a]]` has no valid form.
|
||||
- Two lenient grammar edges are closed: a sign in a `\u` or `\U` escape,
|
||||
which is not a hex digit, is rejected instead of evaluating, and a bare
|
||||
carriage return right after a multi-line string's opening delimiter is
|
||||
the bare-CR error instead of a newline trimmed silently.
|
||||
|
||||
### Migration from 1.x
|
||||
|
||||
|
||||
Reference in New Issue
Block a user