Skip to content
Myr

Merge pull request #112 from jlowdermilk/fix-genmarkdowntree

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Don't prepend filename in default GenMarkdownTree

authored by Eric Paris · committed by Eric Paris · parents d910a04, 7b4b4aa · Browse files · 1 file+3 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−2 removed

  • other:+3 added−2 removed

1 file+3 added−2 removed

modified:md_docs.go+3 added-2 removed
102 unmodified lines
103 fmt.Fprintf(out, "###### Auto generated by spf13/cobra at %s\n", time.Now().UTC())104}105106func GenMarkdownTree(cmd *Command, dir string) {107 noOp := func(s string) string { return s }108 GenMarkdownTreeCustom(cmd, dir, noOp, noOp)107 identity := func(s string) string { return s }108 emptyStr := func(s string) string { return "" }109 GenMarkdownTreeCustom(cmd, dir, emptyStr, identity)110}111112func GenMarkdownTreeCustom(cmd *Command, dir string, filePrepender func(string) string, linkHandler func(string) string) {113 for _, c := range cmd.Commands() {
25 unmodified lines