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)
| 136 | // and `sub` has a subcommand called `third`, it is undefined which |
| 137 | // help output will be in the file `cmd-sub-third.1`. |
| 138 | func 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. |