From c2c20ffd1e85093b449ee08a3398dfb0fd1c1ddc Mon Sep 17 00:00:00 2001 From: adnano Date: Mon, 10 May 2021 12:15:58 -0400 Subject: [PATCH] Use other toml library --- config.go | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config.go b/config.go index c93860b..88a55e0 100644 --- a/config.go +++ b/config.go @@ -8,7 +8,7 @@ import ( "strings" "text/template" - "github.com/BurntSushi/toml" + "github.com/pelletier/go-toml" ) // Config contains site configuration. @@ -43,7 +43,7 @@ func LoadConfig(path string) (*Config, error) { defer f.Close() c := &Config{} - if _, err := toml.DecodeReader(f, c); err != nil { + if err := toml.NewDecoder(f).Decode(c); err != nil { return nil, err } diff --git a/go.mod b/go.mod index a3f161b..369b553 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,6 @@ module kiln go 1.16 require ( - github.com/BurntSushi/toml v0.3.1 + github.com/pelletier/go-toml v1.9.0 gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b ) diff --git a/go.sum b/go.sum index c0bd657..e475c4e 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/pelletier/go-toml v1.9.0 h1:NOd0BRdOKpPf0SxkL3HxSQOG7rNh+4kl6PHcBPFs7Q0= +github.com/pelletier/go-toml v1.9.0/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=