♻️ Rename constancts to not be uppercase
This commit is contained in:
parent
c703a26c10
commit
8a069859ea
4 changed files with 28 additions and 28 deletions
|
|
@ -3,24 +3,24 @@ package config
|
|||
type Env string
|
||||
|
||||
const (
|
||||
DEV Env = "dev"
|
||||
PROD Env = "prod"
|
||||
QA Env = "qa"
|
||||
TEST Env = "test"
|
||||
Dev Env = "dev"
|
||||
Prod Env = "prod"
|
||||
Qa Env = "qa"
|
||||
Test Env = "test"
|
||||
)
|
||||
|
||||
var Envs = [...]Env{
|
||||
DEV,
|
||||
PROD,
|
||||
QA,
|
||||
TEST,
|
||||
Dev,
|
||||
Prod,
|
||||
Qa,
|
||||
Test,
|
||||
}
|
||||
|
||||
func ValidEnvOrDev(e Env) Env {
|
||||
if ValidEnv(e) {
|
||||
return e
|
||||
}
|
||||
return DEV
|
||||
return Dev
|
||||
}
|
||||
|
||||
func ValidEnv(env Env) bool {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue