migration to chi
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"os"
|
||||
)
|
||||
|
||||
func GetFrontendURL() string {
|
||||
if IsDevelopment() {
|
||||
return os.Getenv("DEV_FRONTEND_URL")
|
||||
}
|
||||
return os.Getenv("FRONTEND_URL")
|
||||
}
|
||||
|
||||
func IsDevelopment() bool {
|
||||
return os.Getenv("DEVELOPMENT") == "true"
|
||||
}
|
||||
func IsDebug() bool {
|
||||
return os.Getenv("DEBUG") == "true"
|
||||
}
|
||||
|
||||
func Getenv(key, def string) string {
|
||||
value := os.Getenv(key)
|
||||
if value == "" {
|
||||
return def
|
||||
}
|
||||
return value
|
||||
}
|
||||
Reference in New Issue
Block a user