Files
warewulf/internal/app/wwctl/container/exec/child/root.go
2023-01-31 17:45:09 +01:00

29 lines
769 B
Go

package child
import "github.com/spf13/cobra"
var (
baseCmd = &cobra.Command{
DisableFlagsInUseLine: true,
Use: "__child",
Hidden: true,
RunE: CobraRunE,
Args: cobra.MinimumNArgs(1),
FParseErrWhitelist: cobra.FParseErrWhitelist{UnknownFlags: true},
}
binds []string
tempDir string
nodename string
)
func init() {
baseCmd.Flags().StringVarP(&nodename, "node", "n", "", "create ro overlay for given node")
baseCmd.Flags().StringArrayVarP(&binds, "bind", "b", []string{}, "bind points")
baseCmd.Flags().StringVar(&tempDir, "tempdir", "", "tempdir")
}
// GetRootCommand returns the root cobra.Command for the application.
func GetCommand() *cobra.Command {
return baseCmd
}