fix(error-handling): Handle the .env not found error
Dont panic at that error
This commit is contained in:
parent
5c69c91c4e
commit
a914d6a328
2 changed files with 7 additions and 1 deletions
6
src/.env.test
Normal file
6
src/.env.test
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
DOMAIN="reg.ulmer-furs.de"
|
||||||
|
API_KEY="NeedForEep"
|
||||||
|
DEBUG="true"
|
||||||
|
DATABASE_PATH="/home/tamaki/Documents/coding/pretix-proxy/main.db"
|
||||||
|
API_KEY_PRETIX="ktb7ahh2dzkultyk2vqkafkd7s06fj25lie55a9tx9g2is682an55v1wx8zsh4ij"
|
||||||
|
SECRET="dfdsfdsfdsfsdfsf"
|
|
@ -13,7 +13,7 @@ var Env entities.Environment
|
||||||
func LoadEnv() {
|
func LoadEnv() {
|
||||||
err := godotenv.Load()
|
err := godotenv.Load()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("unable to load .env file: %e", err)
|
log.Printf("unable to load .env file: %e", err)
|
||||||
}
|
}
|
||||||
err = env.Parse(&Env)
|
err = env.Parse(&Env)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue