1
0
mirror of https://github.com/minio/mc.git synced 2025-11-13 12:22:45 +03:00

Revert "unstruct client functions"

This commit is contained in:
Harshavardhana
2015-04-29 21:28:28 -07:00
parent 3ec4e85f92
commit 1ceed3dc20
10 changed files with 63 additions and 54 deletions

View File

@@ -47,10 +47,11 @@ func runSyncCmd(ctx *cli.Context) {
console.Fatalf("Unable to parse arguments. Reason: [%s].\n", e)
}
}
runCopyCmdSingleSourceMultipleTargets(urls)
methods := mcClientMethods{}
runCopyCmdSingleSourceMultipleTargets(methods, urls)
}
func runCopyCmdSingleSourceMultipleTargets(urls []string) {
func runCopyCmdSingleSourceMultipleTargets(methods clientMethods, urls []string) {
sourceURL := urls[0] // first arg is source
targetURLs := urls[1:] // all other are targets
@@ -73,7 +74,7 @@ func runCopyCmdSingleSourceMultipleTargets(urls []string) {
}
for targetURL, targetConfig := range targetURLConfigMap {
err = doCopySingleSourceRecursive(sourceURL, targetURL, sourceConfig, targetConfig)
err = doCopySingleSourceRecursive(methods, sourceURL, targetURL, sourceConfig, targetConfig)
if err != nil {
log.Debug.Println(err)
console.Fatalf("Failed to copy from source [%s] to target %s. Reason: [%s].\n",