mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-11 12:25:53 +02:00
cscli: exclude removed commands from generated docs (#3449)
This commit is contained in:
parent
a001e1d760
commit
a9cc23e446
2 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue