Cody Joyce 2 months ago
parent
commit
3447fa0ecb
1 changed files with 2 additions and 0 deletions
  1. 2 0
      utils/utils.go

+ 2 - 0
utils/utils.go

@@ -55,10 +55,12 @@ func Salt(length int) string {
 func CheckArgs() {
 	if len(os.Args) < 2 {
 		log.Fatalf("ERROR: port number required: eg ./bin 3000")
+		os.Exit(1)
 	}
 
 	_, err := strconv.Atoi(os.Args[1])
 	if err != nil {
 		log.Fatalf("ERROR: port must be a number")
+		os.Exit(1)
 	}
 }