Initial commit
This commit is contained in:
parent
0123ffc572
commit
cb85168cbd
5
main.go
5
main.go
@ -8,6 +8,8 @@ import (
|
||||
"net/http"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
)
|
||||
|
||||
@ -20,7 +22,8 @@ var (
|
||||
|
||||
func main() {
|
||||
// Load .env file
|
||||
err := godotenv.Load()
|
||||
_, b, _, _ := runtime.Caller(0) // @refactor
|
||||
err := godotenv.Load(filepath.Join(filepath.Dir(b), ".env"))
|
||||
if err != nil {
|
||||
fmt.Println("Error loading .env file:", err)
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user