perf(parse): cut allocations and validate UTF-8 in the scan
This commit is contained in:
+2
-1
@@ -19,7 +19,8 @@ Decodes a TOML document into a [Document](#documents): the values, the order the
|
||||
keys were written in, whether a table was written inline, and the comments.
|
||||
The values follow the mapping in the [Decoding](#decoding) section below.
|
||||
Returns `*SyntaxError` on a malformed document. Input that is not valid UTF-8
|
||||
is rejected before the parser runs. Equivalent to
|
||||
is rejected with a `SyntaxError` naming the line where the invalid byte
|
||||
appears, because validity is checked during the scan. Equivalent to
|
||||
`ParseContext(context.Background(), data)`.
|
||||
|
||||
```go
|
||||
|
||||
Reference in New Issue
Block a user