package config import ( "github.com/BurntSushi/toml" ) var Cfg Config type Config struct { Server server Mail mail } type server struct { Debug bool Host string } type mail struct { Host string Port string User string Password string From string TemplatePath string } func LoadConfig() { toml.DecodeFile("./config.toml", &Cfg) }