summaryrefslogtreecommitdiffstats
path: root/go.mod
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2021-07-27 19:07:10 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2021-07-28 11:51:13 +0200
commita3701e09313695d4a0f6fb0eb7844c1a4befc07a (patch)
tree443c85a8b6cbf841155efad4aa99ead8c2824720 /go.mod
parent40b6016cf3f7aac541b042d32e3a162411fd9cd0 (diff)
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
Diffstat (limited to 'go.mod')
-rw-r--r--go.mod3
1 files changed, 1 insertions, 2 deletions
diff --git a/go.mod b/go.mod
index 219e9d64d..a04655eec 100644
--- a/go.mod
+++ b/go.mod
@@ -2,7 +2,6 @@ module github.com/gohugoio/hugo
require (
github.com/BurntSushi/locker v0.0.0-20171006230638-a6e239ea1c69
- github.com/BurntSushi/toml v0.3.1
github.com/PuerkitoBio/purell v1.1.1
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/alecthomas/chroma v0.9.2
@@ -44,7 +43,7 @@ require (
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect
github.com/niklasfasching/go-org v1.5.0
github.com/olekukonko/tablewriter v0.0.5
- github.com/pelletier/go-toml v1.9.3
+ github.com/pelletier/go-toml/v2 v2.0.0-beta.3
github.com/pkg/errors v0.9.1
github.com/rogpeppe/go-internal v1.8.0
github.com/russross/blackfriday v1.5.3-0.20200218234912-41c5fccfd6f6