xid failure should just panic
This commit is contained in:
parent
a1b5912b95
commit
fd632ab1d4
8
fun.go
8
fun.go
|
@ -88,17 +88,15 @@ func xfiltrate() string {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if err != sql.ErrNoRows {
|
if err != sql.ErrNoRows {
|
||||||
log.Printf("err picking xid: %s", err)
|
log.Panicf("err picking xid: %s", err)
|
||||||
return ""
|
|
||||||
}
|
}
|
||||||
r = db.QueryRow("select fileid from files where name = ?", s)
|
r = db.QueryRow("select fileid from files where xid = ?", s)
|
||||||
err = r.Scan(&x)
|
err = r.Scan(&x)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if err != sql.ErrNoRows {
|
if err != sql.ErrNoRows {
|
||||||
log.Printf("err picking xid: %s", err)
|
log.Panicf("err picking xid: %s", err)
|
||||||
return ""
|
|
||||||
}
|
}
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue