Error implements the error interface method.
()
| 1667 | |
| 1668 | // Error implements the error interface method. |
| 1669 | func (e *resolutionError) Error() string { |
| 1670 | if e.missingKey != nil { |
| 1671 | return fmt.Sprintf("no such key: %v", e.missingKey) |
| 1672 | } |
| 1673 | if e.missingIndex != nil { |
| 1674 | return fmt.Sprintf("index out of bounds: %v", e.missingIndex) |
| 1675 | } |
| 1676 | if e.missingAttribute != "" { |
| 1677 | return fmt.Sprintf("no such attribute(s): %s", e.missingAttribute) |
| 1678 | } |
| 1679 | return "invalid attribute" |
| 1680 | } |
| 1681 | |
| 1682 | // Is implements the errors.Is() method used by more recent versions of Go. |
| 1683 | func (e *resolutionError) Is(err error) bool { |
no outgoing calls