Skip to content

Commit

Permalink
Corrige o método de conexao com o MySQl
Browse files Browse the repository at this point in the history
  • Loading branch information
armando-couto committed Mar 29, 2021
1 parent c60b422 commit 7991ce4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mysql_connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ package goutils
import (
"database/sql"
_ "github.com/go-sql-driver/mysql"
"os"
"time"
)

/*
ConnectionBDMySQL o antigo nome era: ConexaoBDMySQL
*/
func ConnectionBDMySQL() *sql.DB {
db, err := sql.Open("mysql", os.Getenv("database_mysql"))
db, err := sql.Open("mysql", Godotenv("database_mysql"))
if err != nil {
CreateFileDay(err.Error())
if db.Ping() != nil {
Expand Down

0 comments on commit 7991ce4

Please sign in to comment.