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 3526c2bd5f
commit ee7bc75bd7
8 changed files with 52 additions and 78 deletions

View File

@@ -15,9 +15,6 @@ import (
"github.com/hpcng/warewulf/internal/pkg/help"
"github.com/hpcng/warewulf/internal/pkg/wwlog"
"github.com/spf13/cobra"
"github.com/spf13/cobra/doc"
"io"
)
var (
@@ -74,19 +71,3 @@ func rootPersistentPreRunE(cmd *cobra.Command, args []string) error {
}
return nil
}
// External functions not used by the wwctl command line
// Generate Bash completion file
func GenBashCompletion(w io.Writer) error {
return rootCmd.GenBashCompletion(w)
}
// Generate man pages
func GenManTree(fileName string) error {
header := &doc.GenManHeader{
Title: "WWCTL",
Section: "1",
}
return doc.GenManTree(rootCmd, header, fileName)
}