1d332cd112fe1c89ddb7ff2f86698a2aa50dc4a9
go-toml V2
Development branch. Probably does not work.
Must do
- Unmarshal into maps.
- Support Array Tables.
- Unmarshal into pointers.
- Support Date / times.
- Support struct tags annotations.
- Support Arrays.
- Support Unmarshaler interface.
- Original go-toml unmarshal tests pass.
- Benchmark!
- Abstract AST.
- Attach comments to AST (gated by parser flag).
- Track file position (line, column) for errors.
- Benchmark again!
Further work
- Rewrite AST to use a single array as storage instead of one allocation per node.
- Provide "minimal allocations" option that uses
unsafeto reuse the input byte array as storage for strings. - Cache reflection operations per type.
Ideas
- Allow types to implement a
ASTUnmarshalerinterface to unmarshal straight from the AST?
License
The MIT License (MIT). Read LICENSE.
Description
Languages
Go
94.6%
Shell
5.4%