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")
|
dsn = flag.String("dsn", "", "Database connection string")
|
||||||
sockpath = flag.String("sock", "", "Unix socket path")
|
sockpath = flag.String("sock", "", "Unix socket path")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
db, err := sql.Open("mysql", *dsn)
|
var err error
|
||||||
|
db, err = sql.Open("mysql", *dsn)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("sql.Open: %s", err.Error())
|
log.Fatalf("sql.Open: %s", err.Error())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue