From 58d40d156e98d415236e51cbc9694a2bb1746e86 Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Thu, 18 May 2023 10:53:28 +0300 Subject: [PATCH] os: remove unnecessary return after t.Fatal Change-Id: Ibddf36431abb799d8f9288d6e17159ce1538d62e Reviewed-on: https://go-review.googlesource.com/c/go/+/495879 Reviewed-by: Ian Lance Taylor Run-TryBot: Robert Griesemer Reviewed-by: Robert Griesemer Auto-Submit: Robert Griesemer TryBot-Result: Gopher Robot --- src/os/error_test.go | 4 ---- src/os/os_test.go | 1 - 2 files changed, 5 deletions(-) diff --git a/src/os/error_test.go b/src/os/error_test.go index 4fa6146194f..8f82ae65d36 100644 --- a/src/os/error_test.go +++ b/src/os/error_test.go @@ -27,11 +27,9 @@ func TestErrIsExist(t *testing.T) { if err == nil { f2.Close() t.Fatal("Open should have failed") - return } if s := checkErrorPredicate("os.IsExist", os.IsExist, err, fs.ErrExist); s != "" { t.Fatal(s) - return } } @@ -68,13 +66,11 @@ func TestErrIsNotExist(t *testing.T) { name := filepath.Join(tmpDir, "NotExists") if s := testErrNotExist(t, name); s != "" { t.Fatal(s) - return } name = filepath.Join(name, "NotExists2") if s := testErrNotExist(t, name); s != "" { t.Fatal(s) - return } } diff --git a/src/os/os_test.go b/src/os/os_test.go index 09d923a3383..0a6be3516a3 100644 --- a/src/os/os_test.go +++ b/src/os/os_test.go @@ -2864,7 +2864,6 @@ func TestDirSeek(t *testing.T) { dirnames2, err := f.Readdirnames(0) if err != nil { t.Fatal(err) - return } if len(dirnames1) != len(dirnames2) {