Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created October 12, 2020 04:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/96bde377ba7a3d4106119ec75e77879f to your computer and use it in GitHub Desktop.
Save parzibyte/96bde377ba7a3d4106119ec75e77879f to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"github.com/joho/godotenv"
"os"
)
var _ = godotenv.Load(".env") // Cargar del archivo llamado ".env"
var (
ConnectionString = fmt.Sprintf("%s:%s@tcp(%s:%s)/%s",
os.Getenv("user"),
os.Getenv("pass"),
os.Getenv("host"),
os.Getenv("port"),
os.Getenv("db_name"))
)
const AllowedCORSDomain = "http://localhost"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment