send all files

This commit is contained in:
2024-07-21 00:15:14 -03:00
parent 1e8cda0139
commit c9464c4a6f
72 changed files with 6335 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
package variable
import (
"log"
"os"
"github.com/joho/godotenv"
)
// use godot package to load/read the .env file and
// return the value of the key
func GetEnvVariable(key string) string {
// load .env file
err := godotenv.Load(".env")
if err != nil {
log.Fatalf("Error loading .env file")
}
return os.Getenv(key)
}