Fix error when passing no names
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
ed3689eae1
commit
57e933c20d
8
main.go
8
main.go
@ -136,6 +136,10 @@ func FilterJobs(jobs []Job, names []string) ([]Job, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func runBackupJobs(jobs []Job, names string) error {
|
func runBackupJobs(jobs []Job, names string) error {
|
||||||
|
if names == "" {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
namesSlice := strings.Split(names, ",")
|
namesSlice := strings.Split(names, ",")
|
||||||
|
|
||||||
if len(namesSlice) == 0 {
|
if len(namesSlice) == 0 {
|
||||||
@ -153,6 +157,10 @@ func runBackupJobs(jobs []Job, names string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func runRestoreJobs(jobs []Job, names string) error {
|
func runRestoreJobs(jobs []Job, names string) error {
|
||||||
|
if names == "" {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
namesSlice := strings.Split(names, ",")
|
namesSlice := strings.Split(names, ",")
|
||||||
|
|
||||||
if len(namesSlice) == 0 {
|
if len(namesSlice) == 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user