diff --git a/bot/reviewbot/tools/gotool.py b/bot/reviewbot/tools/gotool.py
index 5a3a4859b0ff180cf81bfbe01a6010ec289ee5c7..0efb7c4b12ae7981a1c4364987bd0f573f233042 100644
--- a/bot/reviewbot/tools/gotool.py
+++ b/bot/reviewbot/tools/gotool.py
@@ -155,12 +155,13 @@
 
         test_results = OrderedDict()
         found_json_errors = False
+        error_lines = []
 
         for line in output:
             try:
                 entry = json.loads(line)
             except ValueError:
-                found_json_errors = True
+                error_lines.append(line)
                 continue
 
             if 'Test' in entry:
@@ -187,20 +188,21 @@
         if test_results:
             for test_name, test_result in test_results.items():
                 if test_result['failed']:
+                    package = test_result['package']
+                    output = ''.join(test_result['output']).strip()
+
                     review.general_comment(
-                        '%s failed in the %s package:\n'
-                        '\n'
-                        '```%s```'
-                        % (test_name,
-                           test_result['package'],
-                           ''.join(test_result['output']).strip()),
+                        f'{test_name} failed in the {package} package:\n'
+                        f'\n'
+                        f'```{output}```',
                         rich_text=True)
-        elif found_json_errors:
+        elif error_lines:
+            error = ''.join(error_lines).strip()
+
             review.general_comment(
-                'Unable to run `go test` on the %s package:\n'
-                '\n'
-                '```%s```'
-                % (package, ''.join(output).strip()),
+                f'Unable to run `go test` on the {package} package:\n'
+                f'\n'
+                f'```{error}```',
                 rich_text=True)
 
     def run_go_vet(self, package, patched_files_map):
diff --git a/bot/reviewbot/tools/tests/test_clang.py b/bot/reviewbot/tools/tests/test_clang.py
index 3329e6fe66503f347b942fb1dff56518d0364b0f..45e6e7c0edc2ee34aac6481e118cc31438cd62c2 100644
--- a/bot/reviewbot/tools/tests/test_clang.py
+++ b/bot/reviewbot/tools/tests/test_clang.py
@@ -227,8 +227,8 @@
     @integration_test()
     @simulation_test(output=(
         "test.m:3:6: error: use of undeclared identifier 'badcode'\n"
-        "    {badcode}\n"
-        "     ^\n"
+        "    3 |     {badcode}\n"
+        "      |      ^\n"
         "1 error generated.\n"
     ))
     def test_execute_with_objc_and_compiler_error(self):
@@ -256,8 +256,8 @@
                     "```\n"
                     "test.m:3:6: error: use of undeclared identifier "
                     "'badcode'\n"
-                    "    {badcode}\n"
-                    "     ^\n"
+                    "    3 |     {badcode}\n"
+                    "      |      ^\n"
                     "1 error generated.\n"
                     "```"
                 ),
@@ -386,8 +386,8 @@
     @integration_test()
     @simulation_test(output=(
         "test.mm:5:6: error: use of undeclared identifier 'badcode'\n"
-        "    {badcode}\n"
-        "     ^\n"
+        "    5 |     {badcode}\n"
+        "      |      ^\n"
         "1 error generated.\n"
     ))
     def test_execute_with_objcpp_and_compiler_error(self):
@@ -417,8 +417,8 @@
                     "```\n"
                     "test.mm:5:6: error: use of undeclared identifier "
                     "'badcode'\n"
-                    "    {badcode}\n"
-                    "     ^\n"
+                    "    5 |     {badcode}\n"
+                    "      |      ^\n"
                     "1 error generated.\n"
                     "```"
                 ),
diff --git a/bot/reviewbot/tools/tests/test_gotool.py b/bot/reviewbot/tools/tests/test_gotool.py
index f0cfb87afccfc6125e253c4353e38a8d5b3d9f04..d396811a64792b227b1cd1c45e47eee7eb7f2962 100644
--- a/bot/reviewbot/tools/tests/test_gotool.py
+++ b/bot/reviewbot/tools/tests/test_gotool.py
@@ -173,10 +173,7 @@
     @integration_test()
     @simulation_test(test_output=[
         '# example.com/myrepo/mypackage\n',
-
-        'mypackage/main.go:4:1: syntax error: unexpected EOF, expecting }\n',
-
-        'FAIL\texample.com/myrepo/mypackage [build failed]\n',
+        'mypackage/main.go:4:1: syntax error: unexpected EOF, expected }\n',
     ])
     def test_execute_with_test_and_syntax_error(self):
         """Testing GoTool.execute with test setting and syntax error"""
@@ -196,10 +193,11 @@
                 'text': (
                     'Unable to run `go test` on the mypackage package:\n'
                     '\n'
-                    '```# example.com/myrepo/mypackage\n'
+                    '```'
+                    '# example.com/myrepo/mypackage\n'
                     'mypackage/main.go:4:1: syntax error: unexpected EOF, '
-                    'expecting }\n'
-                    'FAIL\texample.com/myrepo/mypackage [build failed]```'
+                    'expected }'
+                    '```'
                 ),
                 'issue_opened': True,
                 'rich_text': True,
