appidea-picture-storage-han.../modules/config/config.go

31 lines
374 B
Go

package config
import "github.com/BurntSushi/toml"
var Cfg Config
type Config struct {
Server server
RabbitMq rabbitmq
Storage storage
}
type server struct {
Debug bool
Host string
}
type rabbitmq struct {
Host string
Username string
Password string
}
type storage struct {
Path string
}
func LoadConfig() {
toml.DecodeFile("./config.toml", &Cfg)
}