1
0
Fork 0
mirror of https://git.sr.ht/~adnano/kiln synced 2024-04-19 16:33:57 +02:00

Use other toml library

This commit is contained in:
Adnan Maolood 2021-05-10 12:15:58 -04:00
parent 28d241980a
commit d25dc206ff
3 changed files with 5 additions and 5 deletions

View File

@ -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
}

2
go.mod
View File

@ -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
)

4
go.sum
View File

@ -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=