🚧 A bit of initial work

This commit is contained in:
Dan Jones 2024-09-12 16:40:31 -05:00
commit 2b888f203d
7 changed files with 326 additions and 1 deletions

37
config/env.go Normal file
View file

@ -0,0 +1,37 @@
package config
type Env string
const (
DEV Env = "dev"
PROD Env = "prod"
QA Env = "qa"
TEST Env = "test"
)
var Envs = [...]Env{
DEV,
PROD,
QA,
TEST,
}
func ValidEnvOrDev(e Env) Env {
if ValidEnv(e) {
return e
}
return DEV
}
func ValidEnv(env Env) bool {
for _, e := range Envs {
if env == e {
return true
}
}
return false
}
func (e Env) String() string {
return string(e)
}