From a5a4a3e7e353e824b2706a3f7d2fcd1114c88098 Mon Sep 17 00:00:00 2001 From: Evsyukov Denis Date: Sat, 31 Jul 2021 12:13:05 +0300 Subject: [PATCH] [-] os.Exit is redundant Fatal is equivalent to Print() followed by a call to os.Exit(1). https://pkg.go.dev/log#Fatal --- speedtest.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/speedtest.go b/speedtest.go index d314630..34fcb43 100644 --- a/speedtest.go +++ b/speedtest.go @@ -4,7 +4,6 @@ import ( "encoding/json" "fmt" "log" - "os" "time" "github.com/showwin/speedtest-go/speedtest" @@ -184,7 +183,6 @@ func showAverageServerResult(servers speedtest.Servers) { func checkError(err error) { if err != nil { log.Fatal(err) - os.Exit(1) } }