From 7b4b4aaac9a8b00f39bc23a0af512aa5e5d9adbc Mon Sep 17 00:00:00 2001 From: Jeff Lowdermilk Date: Wed, 20 May 2015 17:21:00 -0700 Subject: [PATCH] Don't prepend filename in default GenMarkdownTree --- md_docs.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/md_docs.go b/md_docs.go index ff07953..6092c85 100644 --- a/md_docs.go +++ b/md_docs.go @@ -104,8 +104,9 @@ func GenMarkdownCustom(cmd *Command, out *bytes.Buffer, linkHandler func(string) } func GenMarkdownTree(cmd *Command, dir string) { - noOp := func(s string) string { return s } - GenMarkdownTreeCustom(cmd, dir, noOp, noOp) + identity := func(s string) string { return s } + emptyStr := func(s string) string { return "" } + GenMarkdownTreeCustom(cmd, dir, emptyStr, identity) } func GenMarkdownTreeCustom(cmd *Command, dir string, filePrepender func(string) string, linkHandler func(string) string) {