package acme import "github.com/BurntSushi/toml" type Config struct { Defaults defaults Provider map[string]provider Account map[string]account Hook map[string]hook Desire map[string]desire } type defaults struct { Gracetime string Listen string } type provider struct { Directory string } type account struct { Mail string Phone string Key string } type hook struct { CMD string } type desire struct { Provider string Account string Altnames []string Key string Cert string Webroot string Hooks []string } func LoadConfig(fname string) (*Config, error) { c := &Config{} _, err := toml.DecodeFile(fname, c) return c, err }