owl-blogs/config/config.go

26 lines
331 B
Go
Raw Normal View History

2023-07-08 11:28:06 +00:00
package config
import "os"
const (
SITE_CONFIG = "site_config"
)
2023-07-08 11:28:06 +00:00
type Config interface {
}
type EnvConfig struct {
}
func getEnvOrPanic(key string) string {
value, set := os.LookupEnv(key)
if !set {
panic("Environment variable " + key + " is not set")
}
return value
}
func NewConfig() Config {
2023-07-16 19:48:39 +00:00
return &EnvConfig{}
2023-07-08 11:28:06 +00:00
}