Without the breaks, it's would be possible to query for an Anime
with AID 0, a clear waste of time.
Also move the 'ok = false' assignment closer to where it's documented.
if id, err := strconv.ParseInt(parts[1], 10, 32); err == nil {
ok = true
aid = AID(id)
if id, err := strconv.ParseInt(parts[1], 10, 32); err == nil {
ok = true
aid = AID(id)
}
} else if reply.Code() == 340 {
cache.MarkInvalid(keys...)
cache.Delete(keys...) // deleted EID?
}
} else if reply.Code() == 340 {
cache.MarkInvalid(keys...)
cache.Delete(keys...) // deleted EID?
// check to see if we looked in the right AID
found := false
if a != nil {
// check to see if we looked in the right AID
found := false
if a != nil {
break
} else {
// otherwise, the EID<->AID map broke
break
} else {
// otherwise, the EID<->AID map broke
cache.Delete("aid", "by-eid", eid)
}
}
cache.Delete("aid", "by-eid", eid)
}
}