diff options
author | Niall Sheridan <nsheridan@gmail.com> | 2018-06-20 23:17:21 +0100 |
---|---|---|
committer | Niall Sheridan <nsheridan@gmail.com> | 2018-06-20 23:17:21 +0100 |
commit | 0d9d89fb24cc180c5accb112113a662393c209fd (patch) | |
tree | abc68db475faf7ef4711239e9f79db17e53d6b82 /server/store | |
parent | de6d2c524430287c699aaa898c1325da6afea539 (diff) |
use mysql.NewConfig() to set defaults correctly
Diffstat (limited to 'server/store')
-rw-r--r-- | server/store/sqldb.go | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/server/store/sqldb.go b/server/store/sqldb.go index c5a0f4e..0b91023 100644 --- a/server/store/sqldb.go +++ b/server/store/sqldb.go @@ -38,14 +38,12 @@ func NewSQLStore(c config.Database) (*SQLStore, error) { if err != nil { address = address + ":3306" } - m := &mysql.Config{ - User: c["username"], - Passwd: c["password"], - Net: "tcp", - Addr: address, - DBName: "certs", - ParseTime: true, - } + m := mysql.NewConfig() + m.User = c["username"] + m.Passwd = c["password"] + m.Addr = address + m.DBName = "certs" + m.ParseTime = true dsn = m.FormatDSN() case "sqlite": driver = "sqlite3" |