Readd printHelp function back

But update signature to take a writer. This is a backwards incompatible
change for those overriding the HelpPrinter, but the hope is that this
feature is largely unused and the usage is easily updated.
This commit is contained in:
jszwedko
2015-05-03 17:43:52 -07:00
parent 30b361bf66
commit e842547421
3 changed files with 34 additions and 36 deletions

View File

@@ -3,6 +3,7 @@ package cli_test
import (
"flag"
"fmt"
"io"
"os"
"testing"
@@ -537,7 +538,7 @@ func TestAppHelpPrinter(t *testing.T) {
}()
var wasCalled = false
cli.HelpPrinter = func(template string, data interface{}) {
cli.HelpPrinter = func(w io.Writer, template string, data interface{}) {
wasCalled = true
}