From bf4ad9816ed9f91e04eac5937dddfc7f3c9bcb06 Mon Sep 17 00:00:00 2001 From: Adnan Maolood Date: Sat, 20 Mar 2021 02:42:05 -0400 Subject: [PATCH] Switch to other toml library --- config.go | 4 ++-- go.mod | 2 +- go.sum | 6 ++---- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/config.go b/config.go index 31eee43..a9ec01f 100644 --- a/config.go +++ b/config.go @@ -5,7 +5,7 @@ import ( "os" "text/template" - "github.com/pelletier/go-toml" + "github.com/BurntSushi/toml" ) // Config contains site configuration. @@ -26,7 +26,7 @@ func LoadConfig(path string) (*Config, error) { } defer f.Close() - if err := toml.NewDecoder(f).Decode(c); err != nil { + if _, err := toml.DecodeReader(f, c); err != nil { return nil, err } diff --git a/go.mod b/go.mod index c6b3dae..333d2c4 100644 --- a/go.mod +++ b/go.mod @@ -4,5 +4,5 @@ go 1.16 require ( git.sr.ht/~adnano/go-gemini v0.1.8 - github.com/pelletier/go-toml v1.8.1 + github.com/BurntSushi/toml v0.3.1 ) diff --git a/go.sum b/go.sum index 1565b93..9ed9c1d 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,4 @@ git.sr.ht/~adnano/go-gemini v0.1.8 h1:93DxDNXB0bjnfDhZewf+QsEopfuOMh/I4v7ujoJ6WIs= git.sr.ht/~adnano/go-gemini v0.1.8/go.mod h1:If1VxEWcZDrRt5FeAFnGTcM2Ud1E3BXs3VJ5rnZWKq0= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -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= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=