Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Switch to go-toml v2
We have been using `go-toml` for language files only. This commit makes it the only TOML library. It's spec compliant and very fast. A benchark building a site with 200 pages with TOML front matter: ```bash name old time/op new time/op delta SiteNew/Regular_TOML_front_matter-16 48.5ms ± 1% 47.1ms ± 1% -2.85% (p=0.029 n=4+4) name old alloc/op new alloc/op delta SiteNew/Regular_TOML_front_matter-16 16.9MB ± 0% 16.7MB ± 0% -1.56% (p=0.029 n=4+4) name old allocs/op new allocs/op delta SiteNew/Regular_TOML_front_matter-16 302k ± 0% 296k ± 0% -2.20% (p=0.029 n=4+4) ``` Note that the front matter unmarshaling is only a small part of building a site, so the above is very good. Fixes #8801
- Loading branch information
Showing
with
50 additions
and 40 deletions.
- +1 −1 commands/commands_test.go
- +0 −1 common/herrors/file_error_test.go
- +13 −2 common/herrors/line_number_extractors.go
- +1 −2 go.mod
- +4 −1 go.sum
- +12 −12 hugolib/config_test.go
- +2 −2 hugolib/configdir_test.go
- +1 −1 langs/i18n/translationProvider.go
- +1 −1 parser/frontmatter.go
- +2 −2 parser/frontmatter_test.go
- +1 −1 parser/metadecoders/decoder.go
- +12 −14 tpl/transform/remarshal_test.go