Skip to content

Commit

Permalink
delete minor unreachable code caused by log.Fatal
Browse files Browse the repository at this point in the history
Signed-off-by: Abirdcfly <[email protected]>
  • Loading branch information
Abirdcfly committed Aug 10, 2022
1 parent df9078d commit b0d86c9
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions cmd/kubefwd/services/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,13 @@ Try:
hostFile, err := txeh.NewHostsDefault()
if err != nil {
log.Fatalf("HostFile error: %s", err.Error())
os.Exit(1)
}

log.Printf("Loaded hosts file %s\n", hostFile.ReadFilePath)

msg, err := fwdhost.BackupHostFile(hostFile)
if err != nil {
log.Fatalf("Error backing up hostfile: %s\n", err.Error())
os.Exit(1)
}

log.Printf("HostFile management: %s", msg)
Expand Down Expand Up @@ -218,7 +216,6 @@ Try:
rawConfig, err := configGetter.GetClientConfig(cfgFilePath)
if err != nil {
log.Fatalf("Error in get rawConfig: %s\n", err.Error())
os.Exit(1)
}

// labels selector to filter services
Expand Down Expand Up @@ -303,7 +300,6 @@ Try:
restClient, err := configGetter.GetRESTClient()
if err != nil {
log.Fatalf("Error creating k8s RestClient: %s\n", err.Error())
os.Exit(1)
}

for ii, namespace := range namespaces {
Expand Down

0 comments on commit b0d86c9

Please sign in to comment.