corso/src/cli/utils/onedrive.go
Vaibhav Kamra a9b0e2e7ee
OneDrive CLI commands (#739)
## Description

Wires up the OneDrive Backup(create,list,details,delete) and Restore commands

Unit tests added but integration tests will be added after the underlying operation
PRs are merged.

## Type of change

Please check the type of change your PR introduces:
- [x] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Test
- [ ] 🐹 Trivial/Minor

## Issue(s)
#658 
#668 

## Test Plan

<!-- How will this be tested prior to merging.-->

- [x] 💪 Manual
- [x]  Unit test
- [ ] 💚 E2E
2022-09-16 20:32:36 +00:00

15 lines
276 B
Go

package utils
import (
"errors"
)
// ValidateOneDriveRestoreFlags checks common flags for correctness and interdependencies
func ValidateOneDriveRestoreFlags(backupID string) error {
if len(backupID) == 0 {
return errors.New("a backup ID is required")
}
return nil
}