Update communicator.go

If block ends in a return statement.  Personal preference. It's less explicit, but more concise to drop the else and outdent the return.
This commit is contained in:
bdd 2014-08-07 14:29:02 -04:00
parent 08c1a19cbf
commit 462bbece95
1 changed files with 3 additions and 4 deletions

View File

@ -218,10 +218,9 @@ func (c *SSHCommunicator) UploadDir(dst string, src string, excl []string) error
if src[len(src)-1] != '/' {
log.Printf("No trailing slash, creating the source directory name")
return scpUploadDirProtocol(filepath.Base(src), w, r, uploadEntries)
} else {
// Trailing slash, so only upload the contents
return uploadEntries()
}
}
// Trailing slash, so only upload the contents
return uploadEntries()
}
return c.scpSession("scp -rvt "+dst, scpFunc)