Fix linting errors

This commit is contained in:
Dan Sosedoff
2022-11-14 16:10:50 -06:00
parent 580c1093d1
commit 9bfec11b48
7 changed files with 32 additions and 15 deletions

View File

@@ -11,10 +11,7 @@ import (
func IsPortAvailable(port int) bool {
conn, err := net.Dial("tcp", fmt.Sprintf("127.0.0.1:%v", port))
if err != nil {
if strings.Index(err.Error(), "connection refused") > 0 {
return true
}
return false
return strings.Index(err.Error(), "connection refused") > 0
}
conn.Close()