Files
warewulf/internal/app/wwctl/overlay/edit/root.go
2020-11-16 22:43:13 -08:00

33 lines
722 B
Go

package edit
import (
"github.com/spf13/cobra"
)
var (
baseCmd = &cobra.Command{
Use: "edit [overlay name] [file path]",
Short: "Edit Warewulf Overlay files",
Long: "Warewulf edit overlay files",
RunE: CobraRunE,
Args: cobra.ExactArgs(2),
}
SystemOverlay bool
ListFiles bool
)
func init() {
baseCmd.PersistentFlags().BoolVarP(&SystemOverlay, "system", "s", false, "Show system overlays instead of runtime")
baseCmd.PersistentFlags().BoolVarP(&ListFiles, "files", "f", false, "List files contained within a given overlay")
}
// GetRootCommand returns the root cobra.Command for the application.
func GetCommand() *cobra.Command {
return baseCmd
}