Switch to other toml library

This commit is contained in:
adnano 2021-03-20 23:54:55 -04:00
parent d30faf0fcd
commit 713c1336fb
3 changed files with 5 additions and 7 deletions

View file

@ -6,7 +6,7 @@ import (
"path" "path"
"text/template" "text/template"
"github.com/pelletier/go-toml" "github.com/BurntSushi/toml"
) )
// Config contains site configuration. // Config contains site configuration.
@ -47,7 +47,7 @@ func LoadConfig(path string) (*Config, error) {
} }
defer f.Close() defer f.Close()
if err := toml.NewDecoder(f).Decode(c); err != nil { if _, err := toml.DecodeReader(f, c); err != nil {
return nil, err return nil, err
} }

2
go.mod
View file

@ -4,5 +4,5 @@ go 1.16
require ( require (
git.sr.ht/~adnano/go-gemini v0.1.22 git.sr.ht/~adnano/go-gemini v0.1.22
github.com/pelletier/go-toml v1.8.1 github.com/BurntSushi/toml v0.3.1
) )

6
go.sum
View file

@ -1,9 +1,7 @@
git.sr.ht/~adnano/go-gemini v0.1.22 h1:hQX8Yh5zhxoDuibMIf50Qot0Mi4qfdIMYFCxdYjY580= git.sr.ht/~adnano/go-gemini v0.1.22 h1:hQX8Yh5zhxoDuibMIf50Qot0Mi4qfdIMYFCxdYjY580=
git.sr.ht/~adnano/go-gemini v0.1.22/go.mod h1:kmWT0aLnjkuzAMouxNT6Bqv756HYHSe56HE7yoF5P7Y= git.sr.ht/~adnano/go-gemini v0.1.22/go.mod h1:kmWT0aLnjkuzAMouxNT6Bqv756HYHSe56HE7yoF5P7Y=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/pelletier/go-toml v1.8.1 h1:1Nf83orprkJyknT6h7zbuEGUEjcyVlCxSUGTENmNCRM=
github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc=
golang.org/x/net v0.0.0-20210119194325-5f4716e94777 h1:003p0dJM77cxMSyCPFphvZf/Y5/NXf5fzg6ufd1/Oew= golang.org/x/net v0.0.0-20210119194325-5f4716e94777 h1:003p0dJM77cxMSyCPFphvZf/Y5/NXf5fzg6ufd1/Oew=
golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=