Fixed missing AUTH_HANDLER_URL env issue
This commit is contained in:
parent
941c5fdf92
commit
c644f42ea9
@ -3,7 +3,6 @@ package config
|
|||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/gofiber/fiber/v2/log"
|
|
||||||
"github.com/joho/godotenv"
|
"github.com/joho/godotenv"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -16,7 +15,7 @@ func init() {
|
|||||||
func GetEnv(name string, defVal string) string {
|
func GetEnv(name string, defVal string) string {
|
||||||
env := os.Getenv(name)
|
env := os.Getenv(name)
|
||||||
if env == "" {
|
if env == "" {
|
||||||
log.Panicf("Missing %s env variable", name)
|
return defVal
|
||||||
}
|
}
|
||||||
|
|
||||||
return env
|
return env
|
||||||
|
Loading…
Reference in New Issue
Block a user