Skip to content

ocean2811/go-toml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-toml V2

Development branch. Probably does not work.

👉 Discussion on github.

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.
  • Original go-toml testgen tests pass.
  • Track file position (line, column) for errors.
  • Attach comments to AST (gated by parser flag).
  • 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 unsafe to reuse the input byte array as storage for strings.
  • Cache reflection operations per type.
  • Optimize tracker pass.

Ideas

  • Allow types to implement a ASTUnmarshaler interface to unmarshal straight from the AST?

License

The MIT License (MIT). Read LICENSE.

About

Go library for the TOML file format

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 98.5%
  • Shell 1.5%