all repos — gopkgs @ 21197d6c1b5eab893c214ce58909c3fc77d24afc

Go module vanity import paths

switch to yaml

Alan Pearce
commit

21197d6c1b5eab893c214ce58909c3fc77d24afc

parent

4fb845fad305b08c682e6f61d3764ef3df7d16db

1 file changed, 5 insertions(+), 3 deletions(-)

changed files
M main.gomain.go
@@ -7,8 +7,8 @@ "net/url"
"os" "path/filepath" - "github.com/pelletier/go-toml/v2" "go.alanpearce.eu/gomponents" + "gopkg.in/yaml.v3" ) type Config struct {
@@ -71,7 +71,7 @@ if err != nil {
return nil, err } defer file.Close() - dec := toml.NewDecoder(file) + dec := yaml.NewDecoder(file) err = dec.Decode(cfg) if err != nil { return nil, err
@@ -98,8 +98,10 @@ return c.Render(file)
} func main() { - cfg, err := getConfig("vanity.toml") + cfg, err := getConfig("vanity.yaml") fatal(err) + + log.Println(cfg) err = renderToFile( ListPage(cfg),