sshpoke/pkg/errtools/is_port_missing_err.go

19 lines
251 B
Go
Raw Permalink Normal View History

2023-11-18 17:51:04 +03:00
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)
}
}