]> Cypherpunks repositories - gostls13.git/commitdiff
all: clean up unreachable Continue after Fatal
authorhopehook <hopehook.com@gmail.com>
Tue, 9 Aug 2022 22:52:22 +0000 (06:52 +0800)
committerGopher Robot <gobot@golang.org>
Wed, 17 Aug 2022 02:52:18 +0000 (02:52 +0000)
As CL 422214 did, this CL intends to clean up the rest
unreachable "Continue" after Fatal.

Change-Id: I3b7e1b59bdfccb185e20525ce113e241d277dad3
Reviewed-on: https://go-review.googlesource.com/c/go/+/422514
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: hopehook <hopehook@qq.com>

src/cmd/go/internal/get/get.go
src/reflect/all_test.go

index 1bb67bcf51b55aa87f6137938103af0f7856f2b6..586427ff33d698ad5ab6a16be61357ef3e4aae47 100644 (file)
@@ -206,7 +206,6 @@ func downloadPaths(patterns []string) []string {
        for _, arg := range patterns {
                if strings.Contains(arg, "@") {
                        base.Fatalf("go: can only use path@version syntax with 'go get' and 'go install' in module-aware mode")
-                       continue
                }
 
                // Guard against 'go get x.go', a common mistake.
index aa620bf0ee0e5b944434fdfc5436ff370d35ec8a..3a360b6c71b9f44dfc35e298baefe643c71e63a5 100644 (file)
@@ -1876,11 +1876,9 @@ func TestSelect(t *testing.T) {
                                recvStr = fmt.Sprintf(", received %v, %v", recv.Interface(), recvOK)
                        }
                        t.Fatalf("%s\nselected #%d incorrectly%s", fmtSelect(info), i, recvStr)
-                       continue
                }
                if cas.panic {
                        t.Fatalf("%s\nselected #%d incorrectly (case should panic)", fmtSelect(info), i)
-                       continue
                }
 
                if cases[i].Dir == SelectRecv {