(err error)
| 358 | } |
| 359 | |
| 360 | func handleTemplateError(err error) { |
| 361 | if err != nil { |
| 362 | tracef("error encountered during template parse: %[1]v", err) |
| 363 | // If the writer is closed, t.Execute will fail, and there's nothing |
| 364 | // we can do to recover. |
| 365 | if os.Getenv("CLI_TEMPLATE_ERROR_DEBUG") != "" { |
| 366 | _, _ = fmt.Fprintf(ErrWriter, "CLI TEMPLATE ERROR: %#v\n", err) |
| 367 | } |
| 368 | return |
| 369 | } |
| 370 | } |
| 371 | |
| 372 | // DefaultPrintHelpCustom is the default implementation of HelpPrinterCustom. |
| 373 | // |