Format formats the error to the writer in PrettyErrorFormatter. This error should be human readable.
(err error)
| 1318 | // Format formats the error to the writer in PrettyErrorFormatter. |
| 1319 | // This error should be human readable. |
| 1320 | func (p *PrettyErrorFormatter) Format(err error) { |
| 1321 | output, _ := cliHumanFormatError("", err, &formatOpts{ |
| 1322 | Verbose: p.verbose, |
| 1323 | }) |
| 1324 | // always trail with a newline |
| 1325 | _, _ = p.w.Write([]byte(output + "\n")) |
| 1326 | } |
| 1327 | |
| 1328 | type formatOpts struct { |
| 1329 | Verbose bool |