corso/src/cli/backup/backup.go
Keepers 8a9c1acc9e
add cli backup command (#142)
* add cli backup command

adds the `corso backup` command to the cli.  Currently
only displays the backup help.

* add backup to cli cmds, fix verbiage
2022-06-06 14:08:34 -06:00

27 lines
661 B
Go

package backup
import (
"github.com/spf13/cobra"
)
// AddCommands attaches all `corso backup * *` commands to the parent.
func AddCommands(parent *cobra.Command) {
parent.AddCommand(backupCmd)
}
// The backup category of commands.
// `corso backup [<subcommand>] [<flag>...]`
var backupCmd = &cobra.Command{
Use: "backup",
Short: "Backup your application data.",
Long: `Backup the data stored in one of your M365 applications.`,
Run: handleBackupCmd,
Args: cobra.NoArgs,
}
// Handler for flat calls to `corso backup`.
// Produces the same output as `corso backup --help`.
func handleBackupCmd(cmd *cobra.Command, args []string) {
cmd.Help()
}