mirror of
https://github.com/acaloiaro/neoq
synced 2026-07-21 18:29:08 +00:00
replace TrimLeft with TrimPrefix
This commit is contained in:
parent
b818224df9
commit
e4da1db487
2 changed files with 2 additions and 2 deletions
|
|
@ -135,7 +135,7 @@ func (s *SqliteBackend) initializeDB() (err error) {
|
|||
return
|
||||
}
|
||||
|
||||
dbPath := strings.TrimLeft(s.config.ConnectionString, "sqlite3://")
|
||||
dbPath := strings.TrimPrefix(s.config.ConnectionString, "sqlite3://")
|
||||
s.db, err = sql.Open("sqlite3", dbPath)
|
||||
if err != nil {
|
||||
s.logger.Error("unable to set db connection")
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@ func prepareAndCleanupDB(t *testing.T) (dbURL string, db *sql.DB) {
|
|||
}
|
||||
|
||||
cwd, _ := os.Getwd()
|
||||
dbURL = "sqlite3://" + cwd + "/test.db"
|
||||
dbPath := cwd + "/test.db"
|
||||
dbURL = "sqlite3://" + dbPath
|
||||
|
||||
m, err := migrate.NewWithSourceInstance("iofs", migrations, dbURL)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue