package config import ( "github.com/BurntSushi/toml" _ "github.com/go-sql-driver/mysql" ) var conf Config type Config struct { Server server Database database } type server struct { Debug bool Host string Secret string } type database struct { Host string Database string Username string Password string } func LoadConfig() { toml.DecodeFile("./config.toml", &conf) } func GetConfig() Config { return conf }