cscli: exclude removed commands from generated docs (#3449)

This commit is contained in:
mmetc 2025-02-07 10:52:14 +01:00 committed by GitHub
parent a001e1d760
commit a9cc23e446
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View file

@ -9,11 +9,13 @@ import (
func (cli *cliConfig) newBackupCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "backup",
Short: "This command has been removed. You can backup/restore the configuration by other means.",
DisableAutoGenTag: true,
RunE: func(_ *cobra.Command, _ []string) error {
configDir := cli.cfg().ConfigPaths.ConfigDir
return fmt.Errorf("'cscli config backup' has been removed, you can manually backup/restore %s instead", configDir)
},
Hidden: true,
}
return cmd

View file

@ -9,11 +9,13 @@ import (
func (cli *cliConfig) newRestoreCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "restore",
Short: "This command has been removed. You can backup/restore the configuration by other means.",
DisableAutoGenTag: true,
RunE: func(cmd *cobra.Command, _ []string) error {
RunE: func(_ *cobra.Command, _ []string) error {
configDir := cli.cfg().ConfigPaths.ConfigDir
return fmt.Errorf("'cscli config restore' has been removed, you can manually backup/restore %s instead", configDir)
},
Hidden: true,
}
return cmd