This commit is contained in:
Your Name 2021-08-16 18:30:54 -04:00
parent 5adef21a0e
commit 0e745fe5a1
1 changed files with 2 additions and 1 deletions

View File

@ -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())
} }