Merge pull request #320 from technosophos/master

Remove panic from help.
main
Jesse Szwedko 9 years ago
commit ca6f864fa3

@ -180,7 +180,9 @@ func printHelp(out io.Writer, templ string, data interface{}) {
t := template.Must(template.New("help").Funcs(funcMap).Parse(templ)) t := template.Must(template.New("help").Funcs(funcMap).Parse(templ))
err := t.Execute(w, data) err := t.Execute(w, data)
if err != nil { if err != nil {
panic(err) // If the writer is closed, t.Execute will fail, and there's nothing
// we can do to recover. We could send this to os.Stderr if we need.
return
} }
w.Flush() w.Flush()
} }

Loading…
Cancel
Save