fix comment about db URLs and trim dbConnect
This commit is contained in:
parent
b08e6e0bad
commit
42a626f9fc
|
|
@ -77,10 +77,10 @@ func NewDbMap(driver string, dbConnect string) (*gorp.DbMap, error) {
|
||||||
// username unescaped. Compromise by doing the leg work if the config
|
// username unescaped. Compromise by doing the leg work if the config
|
||||||
// says the database URL's scheme is a fake one called
|
// says the database URL's scheme is a fake one called
|
||||||
// "mysqltcp://". See
|
// "mysqltcp://". See
|
||||||
// https://github.com/go-sql-driver/mysql/issues/362 and
|
// https://github.com/go-sql-driver/mysql/issues/362 for why we have
|
||||||
// https://github.com/golang/go/issues/12023 for why we have to futz
|
// to futz around and avoid URL.String.
|
||||||
// around and avoid URL.String.
|
|
||||||
func recombineURLForDB(dbConnect string) (string, error) {
|
func recombineURLForDB(dbConnect string) (string, error) {
|
||||||
|
dbConnect = strings.TrimSpace(dbConnect)
|
||||||
if !strings.HasPrefix(dbConnect, "mysqltcp://") {
|
if !strings.HasPrefix(dbConnect, "mysqltcp://") {
|
||||||
return dbConnect, nil
|
return dbConnect, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue