generate man pages via sub command
Signed-off-by: Christian Goll <cgoll@suse.de>
This commit is contained in:
15
internal/app/wwctl/genconf/man/main.go
Normal file
15
internal/app/wwctl/genconf/man/main.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user