capture errors in scanner main

This commit is contained in:
sentriz
2019-05-24 15:36:09 +01:00
parent a91ef24139
commit 4b66a84985
3 changed files with 7 additions and 6 deletions

View File

@@ -53,8 +53,7 @@ func main() {
*listenAddr,
)
log.Printf("starting server at %s", *listenAddr)
err = s.ListenAndServe()
if err != nil {
if err := s.ListenAndServe(); err != nil {
log.Fatalf("error starting server: %v\n", err)
}
}