Error satisfies the builtin error interface
()
| 314 | |
| 315 | // Error satisfies the builtin error interface |
| 316 | func (e BlockItemValidationError) Error() string { |
| 317 | cause := "" |
| 318 | if e.cause != nil { |
| 319 | cause = fmt.Sprintf(" | caused by: %v", e.cause) |
| 320 | } |
| 321 | |
| 322 | key := "" |
| 323 | if e.key { |
| 324 | key = "key for " |
| 325 | } |
| 326 | |
| 327 | return fmt.Sprintf( |
| 328 | "invalid %sBlockItem.%s: %s%s", |
| 329 | key, |
| 330 | e.field, |
| 331 | e.reason, |
| 332 | cause) |
| 333 | } |
| 334 | |
| 335 | var _ error = BlockItemValidationError{} |
| 336 |
nothing calls this directly
no outgoing calls
no test coverage detected