3
0
2022-11-14 09:26:39 +01:00

17 lines
290 B
Go

package options
import (
"strings"
)
func (o *DBOpt) Cleanup() {
if o.DSN != "" && !strings.Contains(o.DSN, "://") {
// Make sure DSN is compatible with new requirements
o.DSN = "mysql://" + o.DSN
}
}
func (o DBOpt) IsSQLite() bool {
return strings.HasPrefix(o.DSN, "sqlite3")
}