| 165 | } |
| 166 | |
| 167 | func pullRowScanArgs(fn *ast.FuncDecl) []ast.Expr { |
| 168 | for _, exp := range fn.Body.List { |
| 169 | if forStmt, ok := exp.(*ast.ForStmt); ok { |
| 170 | // This came from the debugger window and tracking it down. |
| 171 | rowScan := (forStmt.Body. |
| 172 | // Second statement in the for loop is the if statement |
| 173 | // with rows.can |
| 174 | List[1].(*ast.IfStmt). |
| 175 | // This is the err := rows.Scan() |
| 176 | Init.(*ast.AssignStmt). |
| 177 | // Rhs is the row.Scan part |
| 178 | Rhs)[0].(*ast.CallExpr) |
| 179 | return rowScan.Args |
| 180 | } |
| 181 | } |
| 182 | return nil |
| 183 | } |