sqlrows
sqlrows copied to clipboard
panic: *ssa.Phi during rows declaration without assignment
sqlrows
panics when parsing the following code:
var rows *sql.Rows
if foo {
rows, err = queryFoo()
} else {
rows, err = queryBar()
}
if err != nil { return err }
defer rows.Close()
After digging in, it seems this is because var rows *sql.Rows
comes in as an *ssa.Phi
rather than an *ssa.Extract
.