owl-blogs/config/config.go

27 lines
373 B
Go
Raw Permalink Normal View History

2023-07-08 11:28:06 +00:00
package config
import "os"
const (
2024-05-13 17:03:21 +00:00
SITE_CONFIG = "site_config"
ACT_PUB_CONF_NAME = "activity_pub"
)
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
}