Skip to content

Commit

Permalink
[-] os.Exit is redundant
Browse files Browse the repository at this point in the history
Fatal is equivalent to Print() followed by a call to os.Exit(1).
https://pkg.go.dev/log#Fatal
  • Loading branch information
juev committed Jul 31, 2021
1 parent bc0d679 commit a5a4a3e
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions speedtest.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"encoding/json"
"fmt"
"log"
"os"
"time"

"github.com/showwin/speedtest-go/speedtest"
Expand Down Expand Up @@ -184,7 +183,6 @@ func showAverageServerResult(servers speedtest.Servers) {
func checkError(err error) {
if err != nil {
log.Fatal(err)
os.Exit(1)
}
}

Expand Down

0 comments on commit a5a4a3e

Please sign in to comment.