appidea-mailer/modules/config/config.go

31 lines
386 B
Go

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)
}