generate man pages via sub command

Signed-off-by: Christian Goll <cgoll@suse.de>
This commit is contained in:
Christian Goll
2023-03-02 11:01:11 +01:00
parent ab2139a1fd
commit 94866656a4
8 changed files with 52 additions and 78 deletions

View File

@@ -0,0 +1,15 @@
package man
import (
"github.com/spf13/cobra"
"github.com/spf13/cobra/doc"
)
func CobraRunE(cmd *cobra.Command, args []string) (err error) {
header := &doc.GenManHeader{
Title: "WWCTL",
Section: "1",
}
err = doc.GenManTree(cmd.Parent().Parent(), header, args[0])
return
}