use sqlite driver name based on which specific engine is being used

This commit is contained in:
techknowlogick 2023-04-23 21:05:37 -04:00
parent 14090a9190
commit 92196a7f2d
3 changed files with 5 additions and 1 deletions
internal/app/artifactcache

View file

@ -7,3 +7,5 @@
package artifactcache
import _ "github.com/mattn/go-sqlite3"
var sqliteDriverName = "sqlite3"

View file

@ -7,3 +7,5 @@
package artifactcache
import _ "modernc.org/sqlite"
var sqliteDriverName = "sqlite3"

View file

@ -55,7 +55,7 @@ func StartHandler(dir, outboundIP string, port uint16) (*Handler, error) {
return nil, err
}
e, err := xorm.NewEngine("sqlite", filepath.Join(dir, "sqlite.db"))
e, err := xorm.NewEngine(sqliteDriverName, filepath.Join(dir, "sqlite.db"))
if err != nil {
return nil, err
}