mirror of
https://github.com/spf13/cobra
synced 2024-11-24 06:37:06 +00:00
feat: #1140 updating doc gen docs for new method
This commit is contained in:
parent
c71ca75519
commit
53bc9d3219
1 changed files with 8 additions and 0 deletions
|
@ -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 {
|
||||
//...
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue