Simplify GenMarkdownTreeCustom signature

This commit is contained in:
Daniel Martí 2016-01-06 11:49:26 +01:00
parent 5fa1003a36
commit ea06b29c10
2 changed files with 2 additions and 2 deletions

View File

@ -111,7 +111,7 @@ func GenMarkdownTree(cmd *cobra.Command, dir string) {
GenMarkdownTreeCustom(cmd, dir, emptyStr, identity) GenMarkdownTreeCustom(cmd, dir, emptyStr, identity)
} }
func GenMarkdownTreeCustom(cmd *cobra.Command, dir string, filePrepender func(string) string, linkHandler func(string) string) { func GenMarkdownTreeCustom(cmd *cobra.Command, dir string, filePrepender, linkHandler func(string) string) {
for _, c := range cmd.Commands() { for _, c := range cmd.Commands() {
if !c.IsAvailableCommand() || c.IsHelpCommand() { if !c.IsAvailableCommand() || c.IsHelpCommand() {
continue continue

View File

@ -39,7 +39,7 @@ This will write the markdown doc for ONLY "cmd" into the out, buffer.
Both `GenMarkdown` and `GenMarkdownTree` have alternate versions with callbacks to get some control of the output: Both `GenMarkdown` and `GenMarkdownTree` have alternate versions with callbacks to get some control of the output:
```go ```go
func GenMarkdownTreeCustom(cmd *Command, dir string, filePrepender func(string) string, linkHandler func(string) string) { func GenMarkdownTreeCustom(cmd *Command, dir string, filePrepender, linkHandler func(string) string) {
//... //...
} }
``` ```