21 lines
342 B
Go
21 lines
342 B
Go
package cmd
|
|
|
|
import (
|
|
"code.jhot.me/jhot/docker-s3-backup/internal"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(backupCmd)
|
|
}
|
|
|
|
var backupCmd = &cobra.Command{
|
|
Use: "backup",
|
|
Short: "Run the backup once",
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
err := internal.Backup(cmd.Context())
|
|
return err
|
|
},
|
|
}
|