25 lines
639 B
Go
25 lines
639 B
Go
package export
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
"github.com/warewulf/warewulf/internal/app/wwctl/completions"
|
|
)
|
|
|
|
var (
|
|
baseCmd = &cobra.Command{
|
|
DisableFlagsInUseLine: true,
|
|
Use: "export NODENAME",
|
|
Short: "Export nodes as yaml to stdout",
|
|
Long: "This command exports the given nodes as yaml to stdout.",
|
|
RunE: CobraRunE,
|
|
ValidArgsFunction: completions.Nodes,
|
|
Args: cobra.ArbitraryArgs,
|
|
}
|
|
NoHeader bool
|
|
)
|
|
|
|
// GetRootCommand returns the root cobra.Command for the application.
|
|
func GetCommand() *cobra.Command {
|
|
return baseCmd
|
|
}
|