Assisted-by: DeepSeek V4.1 Flash
This commit is contained in:
@@ -23,6 +23,9 @@ the entire official [toml-test](https://github.com/toml-lang/toml-test) suite:
|
||||
user types with text methods need no configuration.
|
||||
- **Cancellation**: every entry point has a `*Context` sibling that honours a
|
||||
`context.Context`.
|
||||
- **Ordered documents**: `Parse` gives a `*Document` that keeps the key order,
|
||||
tells an inline table from a header one, and carries the comments; `ParseMap`
|
||||
gives the plain `map[string]any` tree.
|
||||
- **Configurable emission**: `Encoder` options for declaration-order output,
|
||||
omitting empty arrays, literal multiline strings, and inlining small
|
||||
sub-tables.
|
||||
@@ -67,8 +70,9 @@ err := interpres.Unmarshal(data, &cfg)
|
||||
```
|
||||
|
||||
Fields match by the `toml:"name"` tag, or by the lower-cased field name when no
|
||||
tag is present; `toml:"-"` skips a field. `Parse` returns the untyped
|
||||
`map[string]any` tree instead, and `UnmarshalContext` accepts a context.
|
||||
tag is present; `toml:"-"` skips a field. `Parse` returns a `*Document` that
|
||||
also carries the key order and the comments, `ParseMap` returns the plain
|
||||
`map[string]any` tree, and `UnmarshalContext` accepts a context.
|
||||
|
||||
### Encode from a struct
|
||||
|
||||
|
||||
Reference in New Issue
Block a user