Detail returns the detail message contained in err, if any. An error has a detail message if it was made by WithDetail or WithDetailf.
(err error)
| 113 | // An error has a detail message if it was made by WithDetail |
| 114 | // or WithDetailf. |
| 115 | func Detail(err error) string { |
| 116 | wrapper, _ := err.(wrapperError) |
| 117 | return strings.Join(wrapper.detail, "; ") |
| 118 | } |
| 119 | |
| 120 | // withData returns a new error that wraps err |
| 121 | // as a chain error message containing v as |