9e122af5fcbe987bdb6957d9e29e7e30c85699f3
go-toml V2
Development branch. Use at your own risk.
toml.Unmarshal()should work as well as v1.
Must do
Unmarshal
- 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.
- Original go-toml testgen tests pass.
- Track file position (line, column) for errors.
- Strict mode.
- Document Unmarshal / Decode
Marshal
- Minimal implementation
- Multiline strings
- Multiline arrays
inlinetag for tables- Optional indentation
- Option to pick default quotes
Document
- Gather requirements and design API.
Ideas
- Allow types to implement a
ASTUnmarshalerinterface to unmarshal straight from the AST? - 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.
- Optimize tracker pass.
Differences with v1
License
The MIT License (MIT). Read LICENSE.
Description
Languages
Go
94.6%
Shell
5.4%