Handledf with format and args can be implemented similarly. NotInDomain returns true if and only if the error's domain is not one of the specified domains.
(err error, domains ...Domain)
| 103 | // NotInDomain returns true if and only if the error's |
| 104 | // domain is not one of the specified domains. |
| 105 | func NotInDomain(err error, domains ...Domain) bool { |
| 106 | return notInDomainInternal(GetDomain(err), domains...) |
| 107 | } |
| 108 | |
| 109 | func notInDomainInternal(d Domain, domains ...Domain) bool { |
| 110 | for _, given := range domains { |
searching dependent graphs…