MCPcopy
hub / github.com/spf13/cobra / GenReSTTree

Function GenReSTTree

doc/rest_docs.go:138–141  ·  view source on GitHub ↗

GenReSTTree will generate a ReST page for this command and all descendants in the directory given. This function may not work correctly if your command names have `-` in them. If you have `cmd` with two subcmds, `sub` and `sub-third`, and `sub` has a subcommand called `third`, it is undefined which

(cmd *cobra.Command, dir string)

Source from the content-addressed store, hash-verified

136// and `sub` has a subcommand called `third`, it is undefined which
137// help output will be in the file `cmd-sub-third.1`.
138func GenReSTTree(cmd *cobra.Command, dir string) error {
139 emptyStr := func(s string) string { return "" }
140 return GenReSTTreeCustom(cmd, dir, emptyStr, defaultLinkHandler)
141}
142
143// GenReSTTreeCustom is the same as GenReSTTree, but
144// with custom filePrepender and linkHandler.

Callers 1

TestGenRSTTreeFunction · 0.85

Calls 1

GenReSTTreeCustomFunction · 0.85

Tested by 1

TestGenRSTTreeFunction · 0.68