2021-04-08 19:40:34 -04:00
2021-03-30 22:03:39 -04:00
2021-04-08 10:07:29 -04:00
2019-04-10 13:43:12 +01:00
2019-04-10 13:43:12 +01:00
2021-04-07 13:39:01 -04:00
2021-03-24 22:15:12 -04:00
LF
2021-03-13 18:51:45 -05:00
2021-03-26 09:53:21 -04:00
2021-02-10 10:41:23 -05:00
2021-02-10 10:41:23 -05:00
2021-04-08 10:07:29 -04:00
2021-04-08 10:07:29 -04:00
2021-04-08 10:07:29 -04:00
2021-04-08 10:07:29 -04:00
2021-03-30 21:43:57 -04:00
2021-03-24 20:21:55 -04:00
2021-04-08 10:07:29 -04:00
2021-03-26 09:51:35 -04:00
2021-02-02 08:28:30 -05:00

go-toml V2

Development branch. Use at your own risk.

👉 Discussion on github.

  • 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
  • inline tag for tables
  • Optional indentation
  • Option to pick default quotes

Document

  • Gather requirements and design API.

Ideas

  • Allow types to implement a ASTUnmarshaler interface 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 unsafe to 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.

S
Description
Go library for the TOML file format
Readme MIT 6.5 MiB
Languages
Go 94.6%
Shell 5.4%