]> Cypherpunks repositories - gostls13.git/commitdiff
go/build: remove superfluous continues
authorAinar Garipov <gugl.zadolbal@gmail.com>
Sun, 11 Nov 2018 09:19:20 +0000 (12:19 +0300)
committerBrad Fitzpatrick <bradfitz@golang.org>
Sun, 11 Nov 2018 18:49:40 +0000 (18:49 +0000)
This cleanup was proposed in CL 148937. The branch is already ended with
a continue, so remove continues from subbranches and use an else-if.

Change-Id: Iaf6eb57afc84e25862f99a342f5824e315bcdcb7
Reviewed-on: https://go-review.googlesource.com/c/148922
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/go/build/read_test.go

index 2a36a012d5dfa6ff47b522b76257a5e150ec6462..8636533f6978b150e369604ed86251d0d96dcedd 100644 (file)
@@ -110,11 +110,8 @@ func testRead(t *testing.T, tests []readTest, read func(io.Reader) ([]byte, erro
                if err != nil {
                        if tt.err == "" {
                                t.Errorf("#%d: err=%q, expected success (%q)", i, err, string(buf))
-                               continue
-                       }
-                       if !strings.Contains(err.Error(), tt.err) {
+                       } else if !strings.Contains(err.Error(), tt.err) {
                                t.Errorf("#%d: err=%q, expected %q", i, err, tt.err)
-                               continue
                        }
                        continue
                }