feat: honour TextMarshaler and TextUnmarshaler by default
Test / test (push) Successful in 1m35s

Assisted-by: DeepSeek V4.1 Flash
This commit is contained in:
2026-09-19 02:41:09 +02:00
parent 9023784da3
commit 815141440e
8 changed files with 632 additions and 3 deletions
+3 -1
View File
@@ -18,7 +18,9 @@ the entire official [toml-test](https://github.com/toml-lang/toml-test) suite:
- **Strict decoding**: `NewDecoder().DisallowUnknownFields()` rejects keys that
match no destination field, at every struct depth.
- **Custom types**: `Marshaler` and `Unmarshaler` let a type control its own
TOML representation in both directions.
TOML representation in both directions, and `encoding.TextMarshaler` and
`TextUnmarshaler` are honoured by default, so `net.IP`, `time.Duration` and
user types with text methods need no configuration.
- **Cancellation**: every entry point has a `*Context` sibling that honours a
`context.Context`.
- **Configurable emission**: `Encoder` options for declaration-order output,