IsContextNotFound returns a boolean indicating whether the error is known to report that a context was not found
(err error)
| 46 | // IsContextNotFound returns a boolean indicating whether the error is known to |
| 47 | // report that a context was not found |
| 48 | func IsContextNotFound(err error) bool { |
| 49 | if err == nil { |
| 50 | return false |
| 51 | } |
| 52 | if _, ok := err.(*errContextNotFound); ok || err == ErrNoContext { |
| 53 | return true |
| 54 | } |
| 55 | return strings.Contains(err.Error(), "context was not found for specified context") |
| 56 | } |
| 57 | |
| 58 | // IsEmptyConfig returns true if the provided error indicates the provided configuration |
| 59 | // is empty. |