docs: align the remaining Decoder and Encoder mentions with the options API
Test / test (push) Successful in 1m41s
Test / test (push) Successful in 1m41s
Assisted-by: GLM 5.3 Flash
This commit is contained in:
+6
-6
@@ -547,12 +547,12 @@ sequenceDiagram
|
||||
participant Caller
|
||||
participant Unmarshal as Unmarshal
|
||||
participant Parser as parser
|
||||
participant Decoder as decoder
|
||||
participant Decode as decode
|
||||
Caller->>Unmarshal: data, v
|
||||
Unmarshal->>Parser: ParseContext(ctx, data)
|
||||
Parser-->>Unmarshal: tree or *SyntaxError
|
||||
Unmarshal->>Decoder: decode(tree, reflect value)
|
||||
Decoder-->>Unmarshal: nil or wrapped field error
|
||||
Unmarshal->>Parser: targeted parse straight into v
|
||||
Parser-->>Unmarshal: nil, *SyntaxError, or fallback
|
||||
Unmarshal->>Decode: tree rerun on fallback
|
||||
Decode-->>Unmarshal: nil or wrapped field error
|
||||
Unmarshal-->>Caller: error
|
||||
```
|
||||
|
||||
@@ -647,7 +647,7 @@ parsed as keys of the sub-table.
|
||||
|
||||
### Preserving declaration order
|
||||
|
||||
`LayoutKindDeclaration` on an `Encoder` walks the entries in declaration order
|
||||
`Layout(LayoutKindDeclaration)` walks the entries in declaration order
|
||||
instead, emitting each header immediately before its content:
|
||||
|
||||
```go
|
||||
|
||||
Reference in New Issue
Block a user