s1llyw0rdz/config/cfg.go
2021-11-22 10:06:23 +01:00

23 lines
405 B
Go

package config
import "os"
type (
Config struct {
DatabaseURL string
SessionKey string
Env string
CertFile string
KeyFile string
}
)
func New() *Config {
return &Config{
DatabaseURL: os.Getenv("DATABASE_URL"),
SessionKey: os.Getenv("SESSION_KEY"),
Env: os.Getenv("ENV"),
CertFile: os.Getenv("CERT_FILE"),
KeyFile: os.Getenv("CERT_KEY_FILE"),
}
}