(stmt []byte)
| 868 | } |
| 869 | |
| 870 | func validateSwitchStmt(stmt []byte) error { |
| 871 | exprStr := fmt.Sprintf("func () { switch %s {} }", stmt) |
| 872 | _, err := goparser.ParseExpr(exprStr) |
| 873 | return err |
| 874 | } |
| 875 | |
| 876 | func validateCaseStmt(switchValue string, stmt []byte) error { |
| 877 | exprStr := fmt.Sprintf("func () { switch %s {case %s:} }", switchValue, stmt) |
no outgoing calls
no test coverage detected
searching dependent graphs…