diff --git a/pkg/bbgo/db.go b/pkg/bbgo/db.go deleted file mode 100644 index dcdb0eaec..000000000 --- a/pkg/bbgo/db.go +++ /dev/null @@ -1,6 +0,0 @@ -package bbgo - -import ( - // register the go migrations - _ "github.com/c9s/bbgo/pkg/migrations" -) diff --git a/pkg/server/setup.go b/pkg/server/setup.go index 3c9f118c9..03cf7e445 100644 --- a/pkg/server/setup.go +++ b/pkg/server/setup.go @@ -2,13 +2,13 @@ package server import ( "context" - "database/sql" "net/http" "os" "syscall" "time" "github.com/gin-gonic/gin" + "github.com/jmoiron/sqlx" "github.com/sirupsen/logrus" "github.com/c9s/bbgo/pkg/bbgo" @@ -35,7 +35,7 @@ func (s *Server) setupTestDB(c *gin.Context) { return } - db, err := sql.Open(payload.Driver, payload.DSN) + db, err := sqlx.Connect(payload.Driver, payload.DSN) if err != nil { c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()}) return