}
private static void hasResultButNoReturnAtTheEnd(InspectionResult result, GoFunctionDeclaration function) {
if (hasResult(function) && hasBody(function) && !hasReturnAtTheEnd(function)) {
LocalQuickFix fix1 = new AddReturnStmtFix(function);
LocalQuickFix fix2 = new RemoveFunctionResultFix(function);
PsiElement element = function.getBlock().getLastChild();
result.addProblem(element, GoBundle.message("error.no.return.found"), fix1, fix2);
}
}