sshpoke/pkg/errtools/IsPortMissingErr.go
2023-11-18 17:51:04 +03:00

19 lines
251 B
Go

package errtools
import (
"errors"
"strings"
)
func IsPortMissingErr(err error) bool {
for {
if err == nil {
return false
}
if strings.Contains(err.Error(), "missing port in address") {
return true
}
err = errors.Unwrap(err)
}
}