Error is shorthand for the common idiom NamedError("error", err).
(err error)
| 31 | |
| 32 | // Error is shorthand for the common idiom NamedError("error", err). |
| 33 | func Error(err error) Field { |
| 34 | return NamedError("error", err) |
| 35 | } |
| 36 | |
| 37 | // NamedError constructs a field that lazily stores err.Error() under the |
| 38 | // provided key. Errors which also implement fmt.Formatter (like those produced |