MCPcopy Index your code
hub / github.com/coder/coder / pullRowScanArgs

Function pullRowScanArgs

coderd/database/gentest/modelqueries_test.go:167–183  ·  view source on GitHub ↗
(fn *ast.FuncDecl)

Source from the content-addressed store, hash-verified

165}
166
167func 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}

Callers 1

parseFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected