fix: check .env file existence

This commit is contained in:
jabuxas 2024-09-18 14:00:04 -03:00
parent 2c5a818c10
commit 914e303667

View File

@ -13,7 +13,10 @@ import (
func main() { func main() {
app := new(Application) app := new(Application)
godotenv.Load() err := godotenv.Load()
if err != nil {
slog.Warn("no .env file detected, getting env from running process")
}
app.auth.username = os.Getenv("AUTH_USERNAME") app.auth.username = os.Getenv("AUTH_USERNAME")
app.auth.password = os.Getenv("AUTH_PASSWORD") app.auth.password = os.Getenv("AUTH_PASSWORD")