xid failure should just panic
Ted Unangst tedu@tedunangst.com
Mon, 15 Apr 2019 18:01:30 -0400
M
fun.go
→
fun.go
@@ -88,17 +88,15 @@ if err == nil {
continue } if err != sql.ErrNoRows { - log.Printf("err picking xid: %s", err) - return "" + log.Panicf("err picking xid: %s", err) } - r = db.QueryRow("select fileid from files where name = ?", s) + r = db.QueryRow("select fileid from files where xid = ?", s) err = r.Scan(&x) if err == nil { continue } if err != sql.ErrNoRows { - log.Printf("err picking xid: %s", err) - return "" + log.Panicf("err picking xid: %s", err) } return s }