summaryrefslogtreecommitdiffstats
path: root/commands/commands_test.go
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 /commands/commands_test.go
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 'commands/commands_test.go')
-rw-r--r--commands/commands_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/commands_test.go b/commands/commands_test.go
index 99ffea48c..ef61dc7a5 100644
--- a/commands/commands_test.go
+++ b/commands/commands_test.go
@@ -121,7 +121,7 @@ func TestExecute(t *testing.T) {
resp := Execute([]string{"new", "site", siteDir, "-e=staging"})
c.Assert(resp.Err, qt.IsNil)
config := readFileFrom(c, filepath.Join(siteDir, "config.toml"))
- c.Assert(config, qt.Contains, "baseURL = \"http://example.org/\"")
+ c.Assert(config, qt.Contains, "baseURL = 'http://example.org/'")
checkNewSiteInited(c, siteDir)
})
}