Compare commits

..

No commits in common. "hotfix/hotfix-mysql-error-001" and "master" have entirely different histories.

1 changed files with 5 additions and 6 deletions

View File

@ -3,13 +3,12 @@ package internal
import (
"database/sql"
"fmt"
_ "github.com/go-sql-driver/mysql"
"github.com/jmoiron/sqlx"
"log"
"os"
"sync"
"time"
_ "github.com/go-sql-driver/mysql"
"github.com/jmoiron/sqlx"
)
type database struct {
@ -44,9 +43,9 @@ func initialize() {
if err != nil {
panic(err)
}
conErr := db.Ping()
if conErr != nil {
panic(conErr)
if db.Ping() != nil {
panic(err)
}
log.Println("Connection to db succeded")