owl-blogs/config/config.go

22 lines
291 B
Go
Raw Normal View History

2023-07-08 11:28:06 +00:00
package config
import "os"
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
}