Skip to content

Commit

Permalink
feat: spf13#1140 updating doc gen docs for new method
Browse files Browse the repository at this point in the history
  • Loading branch information
ammiranda committed Jun 19, 2024
1 parent c71ca75 commit 53bc9d3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions site/content/docgen/md.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ func GenMarkdownTreeCustom(cmd *Command, dir string, filePrepender, linkHandler
}
```

```go
func GenMarkdownTreeCustomWithFooter(cmd *Command, dir string, filePrepender, fileAppender, linkHandler func(string) string) error {
//...
}
```

```go
func GenMarkdownCustom(cmd *Command, out *bytes.Buffer, linkHandler func(string) string) error {
//...
Expand All @@ -105,6 +111,8 @@ filePrepender := func(filename string) string {
}
```

The `fileAppender` will append the return value given the full filepath to the rendered Markdown file.

The `linkHandler` can be used to customize the rendered internal links to the commands, given a filename:

```go
Expand Down

0 comments on commit 53bc9d3

Please sign in to comment.