mirror of https://github.com/spf13/cobra.git
feat: #1140 updating doc gen docs for new method
This commit is contained in:
parent
c71ca75519
commit
53bc9d3219
|
@ -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 New Issue