19 lines
251 B
Go
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)
|
||
|
}
|
||
|
}
|