3
0
2020-11-26 11:11:08 +01:00

13 lines
211 B
Go

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