sql
This commit is contained in:
parent
5adef21a0e
commit
0e745fe5a1
3
main.go
3
main.go
|
@ -149,7 +149,8 @@ func init() {
|
|||
dsn = flag.String("dsn", "", "Database connection string")
|
||||
sockpath = flag.String("sock", "", "Unix socket path")
|
||||
flag.Parse()
|
||||
db, err := sql.Open("mysql", *dsn)
|
||||
var err error
|
||||
db, err = sql.Open("mysql", *dsn)
|
||||
if err != nil {
|
||||
log.Fatalf("sql.Open: %s", err.Error())
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue