package main import ( "github.com/BurntSushi/toml" "strings" ) type config struct { docsRoot string templateFile string targetDir string cssFile string baseUrl string } func readConfig(file string) (cfg config, err error) { _, err = toml.DecodeFile(file, &cfg) cfg.baseUrl = strings.TrimSuffix(cfg.baseUrl, "/") return }