(stmt string)
| 50 | } |
| 51 | |
| 52 | func parseStmt(stmt string) (dst.Stmt, error) { |
| 53 | f, err := decorator.Parse(fmt.Sprintf( |
| 54 | `package main |
| 55 | func test() { |
| 56 | %s |
| 57 | }`, stmt)) |
| 58 | if err != nil { |
| 59 | return nil, err |
| 60 | } |
| 61 | return f.Decls[0].(*dst.FuncDecl).Body.List[0], nil |
| 62 | } |
| 63 | |
| 64 | func mustParseStmt(stmt string) dst.Stmt { |
| 65 | ret, err := parseStmt(stmt) |
no test coverage detected
searching dependent graphs…