As implements the errors.As interface.
(target interface{})
| 106 | |
| 107 | // As implements the errors.As interface. |
| 108 | func (*UnauthorizedError) As(target interface{}) bool { |
| 109 | if _, ok := target.(*UnauthorizedError); ok { |
| 110 | return true |
| 111 | } |
| 112 | return false |
| 113 | } |
| 114 | |
| 115 | // correctCancelError will return the correct error for a canceled context. This |
| 116 | // is because rego changes a canceled context to a topdown.CancelErr. This error |
no outgoing calls