From ea06b29c101781006cb324289ef453102250bb25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Wed, 6 Jan 2016 11:49:26 +0100 Subject: [PATCH] Simplify GenMarkdownTreeCustom signature --- doc/md_docs.go | 2 +- doc/md_docs.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/md_docs.go b/doc/md_docs.go index 79bb6870..21b48232 100644 --- a/doc/md_docs.go +++ b/doc/md_docs.go @@ -111,7 +111,7 @@ func GenMarkdownTree(cmd *cobra.Command, dir string) { 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() { if !c.IsAvailableCommand() || c.IsHelpCommand() { continue diff --git a/doc/md_docs.md b/doc/md_docs.md index 41259d2c..8c6a00ab 100644 --- a/doc/md_docs.md +++ b/doc/md_docs.md @@ -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: ```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) { //... } ```