29 lines
745 B
Go
29 lines
745 B
Go
package edit
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
"github.com/warewulf/warewulf/internal/app/wwctl/completions"
|
|
)
|
|
|
|
var (
|
|
baseCmd = &cobra.Command{
|
|
DisableFlagsInUseLine: true,
|
|
Use: "edit [OPTIONS] PROFILE",
|
|
Short: "Edit profile(s) with editor",
|
|
Long: "This command opens an editor for the given profiles.",
|
|
RunE: CobraRunE,
|
|
ValidArgsFunction: completions.Profiles,
|
|
Args: cobra.ArbitraryArgs,
|
|
}
|
|
NoHeader bool
|
|
)
|
|
|
|
func init() {
|
|
baseCmd.PersistentFlags().BoolVar(&NoHeader, "noheader", false, "Do not print header")
|
|
}
|
|
|
|
// GetRootCommand returns the root cobra.Command for the application.
|
|
func GetCommand() *cobra.Command {
|
|
return baseCmd
|
|
}
|