(switchValue string, stmt []byte)
| 874 | } |
| 875 | |
| 876 | func validateCaseStmt(switchValue string, stmt []byte) error { |
| 877 | exprStr := fmt.Sprintf("func () { switch %s {case %s:} }", switchValue, stmt) |
| 878 | _, err := goparser.ParseExpr(exprStr) |
| 879 | return err |
| 880 | } |
| 881 | |
| 882 | func validateFuncCode(code []byte) error { |
| 883 | exprStr := fmt.Sprintf("func () { for { %s\n } }", code) |
no outgoing calls
no test coverage detected
searching dependent graphs…