Error implements the error interface method.
()
| 1461 | |
| 1462 | // Error implements the error interface method. |
| 1463 | func (e *resolutionError) Error() string { |
| 1464 | if e.missingKey != nil { |
| 1465 | return fmt.Sprintf("no such key: %v", e.missingKey) |
| 1466 | } |
| 1467 | if e.missingIndex != nil { |
| 1468 | return fmt.Sprintf("index out of bounds: %v", e.missingIndex) |
| 1469 | } |
| 1470 | if e.missingAttribute != "" { |
| 1471 | return fmt.Sprintf("no such attribute(s): %s", e.missingAttribute) |
| 1472 | } |
| 1473 | return "invalid attribute" |
| 1474 | } |
| 1475 | |
| 1476 | // Is implements the errors.Is() method used by more recent versions of Go. |
| 1477 | func (e *resolutionError) Is(err error) bool { |
no outgoing calls