Provide a variable for writing output with a default of os.Stderr

This commit is contained in:
Matt Farina
2016-05-05 10:26:53 -04:00
parent 75b97d09d9
commit 2a256d4c53
4 changed files with 10 additions and 6 deletions

View File

@@ -188,7 +188,7 @@ func printHelp(out io.Writer, templ string, data interface{}) {
err := t.Execute(w, data)
if err != nil {
// 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.
// we can do to recover. We could send this to OutWriter if we need.
return
}
w.Flush()