It result that if i run go run main.go it loads the .env but when i run go test it will take whatever i pass in this line err := godotenv.Load(filepath.Join("…/…/", “.env.test”))
so now it works
The link points to documentation for a TestMain function you can provide to do special initialization for tests. That’s probably where you want to load your env vars