add docstring for node patterns

Signed-off-by: Tobias Ribizel <mail@ribizel.de>
This commit is contained in:
Tobias Ribizel
2025-07-06 16:34:49 +02:00
parent 93a3000f27
commit 301082cdd7
11 changed files with 23 additions and 11 deletions

View File

@@ -3,6 +3,7 @@ package soft
import (
"github.com/spf13/cobra"
"github.com/warewulf/warewulf/internal/app/wwctl/completions"
"github.com/warewulf/warewulf/internal/pkg/hostlist"
)
type variables struct {
@@ -15,9 +16,9 @@ func GetCommand() *cobra.Command {
vars := variables{}
powerCmd := &cobra.Command{
DisableFlagsInUseLine: true,
Use: "soft",
Use: "soft [OPTIONS] [PATTERN ...]",
Short: "Gracefully shuts down the given node(s)",
Long: "This command uses the operating system to shut down the set of nodes specified by PATTERN.",
Long: "This command uses the operating system to shut down the set of nodes specified by PATTERN.\n" + hostlist.Docstring,
RunE: CobraRunE(&vars),
Args: cobra.MinimumNArgs(1),
ValidArgsFunction: completions.Nodes,