Compare commits
No commits in common. "hotfix/hotfix-mysql-error-001" and "master" have entirely different histories.
hotfix/hot
...
master
|
@ -3,13 +3,12 @@ package internal
|
||||||
import (
|
import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
_ "github.com/go-sql-driver/mysql"
|
||||||
|
"github.com/jmoiron/sqlx"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
_ "github.com/go-sql-driver/mysql"
|
|
||||||
"github.com/jmoiron/sqlx"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type database struct {
|
type database struct {
|
||||||
|
@ -44,9 +43,9 @@ func initialize() {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
conErr := db.Ping()
|
|
||||||
if conErr != nil {
|
if db.Ping() != nil {
|
||||||
panic(conErr)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Println("Connection to db succeded")
|
log.Println("Connection to db succeded")
|
||||||
|
|
Loading…
Reference in New Issue