Removes the use of init() to initialize the variable. - Closes: #1596 - See also: #1569 Signed-off-by: Jonathon Anderson <janderson@ciq.com>
22 lines
631 B
Go
22 lines
631 B
Go
package upgrade
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
|
|
"github.com/warewulf/warewulf/internal/app/wwctl/upgrade/config"
|
|
"github.com/warewulf/warewulf/internal/app/wwctl/upgrade/nodes"
|
|
)
|
|
|
|
func GetCommand() *cobra.Command {
|
|
command := &cobra.Command{
|
|
DisableFlagsInUseLine: true,
|
|
Use: "upgrade <config|nodes> [OPTIONS]",
|
|
Short: "Upgrade configuration files",
|
|
Long: `Upgrade warewulf.conf or nodes.conf from a previous version of Warewulf 4 to a format
|
|
supported by the current version.`,
|
|
}
|
|
command.AddCommand(config.GetCommand())
|
|
command.AddCommand(nodes.GetCommand())
|
|
return command
|
|
}
|