From 20ad6a8a30eedf6a663ad7d103ed3a463539979f Mon Sep 17 00:00:00 2001 From: Jeff Hodges Date: Thu, 20 Aug 2015 16:09:52 -0700 Subject: [PATCH] use URL.EscapedPath now that we are on Go 1.5 Plus fix a typo in a comment --- sa/database.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sa/database.go b/sa/database.go index 7a3f41f09..0849d7962 100644 --- a/sa/database.go +++ b/sa/database.go @@ -59,7 +59,7 @@ func NewDbMap(dbConnect string) (*gorp.DbMap, error) { // the mysql driver. Similarly, the driver needs the password and // username unescaped. Compromise by doing the leg work if the config // says the database URL's scheme is a fake one called -// "mysqltcp://". See +// "mysql+tcp://". See // https://github.com/go-sql-driver/mysql/issues/362 for why we have // to futz around and avoid URL.String. func recombineURLForDB(dbConnect string) (string, error) { @@ -95,8 +95,7 @@ func recombineURLForDB(dbConnect string) (string, error) { dbConn += ":" + passwd } dbConn += "@tcp(" + dbURL.Host + ")" - // TODO(jmhodges): should be dbURL.EscapedPath() but Travis doesn't have 1.5 - return dbConn + dbURL.Path + "?" + dsnVals.Encode(), nil + return dbConn + dbURL.EscapedPath() + "?" + dsnVals.Encode(), nil } // SetSQLDebug enables/disables GORP SQL-level Debugging