mirror of
https://github.com/JuLi0n21/pwa-player.git
synced 2026-04-19 15:30:05 +00:00
ignore env file
This commit is contained in:
@@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"github.com/joho/godotenv"
|
||||
@@ -11,12 +12,12 @@ func main() {
|
||||
|
||||
if value := os.Getenv("ENV"); value == "prod" {
|
||||
if ok := godotenv.Load(".env"); ok != nil {
|
||||
panic(".env not found")
|
||||
log.Println(".env not found")
|
||||
}
|
||||
} else {
|
||||
fmt.Println("Fallback to dev.env")
|
||||
if ok := godotenv.Load("dev.env"); ok != nil {
|
||||
panic("dev.env not found")
|
||||
log.Println("dev.env not found, falling back to ENVIORMENT VARS")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user