Skip to content

Commit 2b1018d

Browse files
authored
delete minor unreachable code caused by t.Fatal or log.Fatal (#4219)
Signed-off-by: Abirdcfly <[email protected]>
1 parent fce0346 commit 2b1018d

File tree

3 files changed

+0
-8
lines changed

3 files changed

+0
-8
lines changed

cli/bundler/bundler.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ func (b *Bundler) Build(ctx *kingpin.ParseContext) error {
101101
ch := text[0:1]
102102
if ch != "y" {
103103
log.Fatal("Aborting")
104-
os.Exit(1)
105104
}
106105
}
107106
} else {

cli/importer/importer.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,23 +67,19 @@ func (i *Importer) Import(ctx *kingpin.ParseContext) (err error) {
6767
err = i.handleSwaggerMode()
6868
if err != nil {
6969
log.Fatal(err)
70-
os.Exit(1)
7170
}
7271
} else if *i.bluePrintMode {
7372
err = i.handleBluePrintMode()
7473
if err != nil {
7574
log.Fatal(err)
76-
os.Exit(1)
7775
}
7876
} else if *i.wsdlMode {
7977
err = i.handleWSDLMode()
8078
if err != nil {
8179
log.Fatal(err)
82-
os.Exit(1)
8380
}
8481
} else {
8582
log.Fatal(errUnknownMode)
86-
os.Exit(1)
8783
}
8884
os.Exit(0)
8985
return nil

test/tcp.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,17 +73,14 @@ func (r TCPTestRunner) Run(t testing.TB, testCases ...TCPTestCase) error {
7373
if tc.ErrorMatch != "" {
7474
if err == nil {
7575
t.Fatalf("[%d] Expected error: %s", ti, tc.ErrorMatch)
76-
break
7776
}
7877

7978
if !strings.Contains(err.Error(), tc.ErrorMatch) {
8079
t.Fatalf("[%d] Expected error %s, got %s", ti, err.Error(), tc.ErrorMatch)
81-
break
8280
}
8381
} else {
8482
if err != nil {
8583
t.Fatalf("[%d] Unexpected error: %s", ti, err.Error())
86-
break
8784
}
8885
}
8986
}

0 commit comments

Comments
 (0)