(err error)
| 3 | import "strings" |
| 4 | |
| 5 | func isConnectionError(err error) bool { |
| 6 | if err == nil { |
| 7 | return false |
| 8 | } |
| 9 | |
| 10 | return strings.Contains(err.Error(), "no such host") || |
| 11 | strings.Contains(err.Error(), "connection refused") |
| 12 | } |
no test coverage detected