JMS #3: Passing a context struct instead of a string

This commit is contained in:
Jeremy Saenz
2013-07-16 08:11:05 -07:00
parent 598fb195c2
commit 96f806fd22
2 changed files with 9 additions and 5 deletions

View File

@@ -22,7 +22,7 @@ func init() {
HelpCommand.Action = ShowHelp
}
func ShowHelp(name string) {
func ShowHelp(c Context) {
helpTemplate := `NAME:
{{.Name}} - {{.Usage}}
@@ -44,7 +44,7 @@ GLOBAL OPTIONS
Usage,
Version,
append(Commands, HelpCommand),
Flags,
Flags,
}
w := tabwriter.NewWriter(os.Stdout, 0, 8, 1, '\t', 0)