added godotenv to load env variables

This commit is contained in:
John O'Keefe 2024-07-21 10:27:59 -04:00
parent 2a75022723
commit d7233a52ba

10
main.go
View File

@ -2,12 +2,20 @@ package main
import (
"embed"
"github.com/joho/godotenv"
"github.com/wailsapp/wails/v2"
"github.com/wailsapp/wails/v2/pkg/options"
"github.com/wailsapp/wails/v2/pkg/options/assetserver"
"log"
)
func init() {
err := godotenv.Load()
if err != nil {
log.Fatal("Error loading .env file")
}
}
//go:embed all:frontend/dist
var assets embed.FS