docs: add modes to validate command

Adds valid modes in the help menu for `validate`.

Signed-off-by: Andrew Rynhard <andrew@rynhard.io>
This commit is contained in:
Andrew Rynhard 2021-01-05 13:23:32 -08:00 committed by Andrew Rynhard
parent d455f917fb
commit 529c03587f
2 changed files with 8 additions and 2 deletions

View File

@ -47,7 +47,13 @@ var validateCmd = &cobra.Command{
func init() {
validateCmd.Flags().StringVarP(&validateConfigArg, "config", "c", "", "the path of the config file")
validateCmd.Flags().StringVarP(&validateModeArg, "mode", "m", "", "the mode to validate the config for")
validateCmd.Flags().StringVarP(
&validateModeArg,
"mode",
"m",
"",
fmt.Sprintf("the mode to validate the config for (valid values are %s, %s, and %s)", runtime.ModeMetal.String(), runtime.ModeCloud.String(), runtime.ModeContainer.String()),
)
cli.Should(validateCmd.MarkFlagRequired("mode"))
addCommand(validateCmd)
}

View File

@ -1709,7 +1709,7 @@ talosctl validate [flags]
```
-c, --config string the path of the config file
-h, --help help for validate
-m, --mode string the mode to validate the config for
-m, --mode string the mode to validate the config for (valid values are metal, cloud, and container)
```
### Options inherited from parent commands