sshpoke/pkg/errtools/is_port_missing_err.go
2023-11-18 21:23:29 +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)
}
}