errFmt has both Format() and FormatError(), and demonstrates the common case of "rich" errors.
| 540 | // errFmt has both Format() and FormatError(), |
| 541 | // and demonstrates the common case of "rich" errors. |
| 542 | type errFmt struct{ msg string } |
| 543 | |
| 544 | func (e *errFmt) Error() string { return e.msg } |
| 545 | func (e *errFmt) Format(s fmt.State, verb rune) { errbase.FormatError(e, s, verb) } |
nothing calls this directly
no outgoing calls
no test coverage detected