From 462bbece95ef7b7e9673cdd46de88d786571450e Mon Sep 17 00:00:00 2001 From: bdd Date: Thu, 7 Aug 2014 14:29:02 -0400 Subject: [PATCH] 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. --- helper/ssh/communicator.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/helper/ssh/communicator.go b/helper/ssh/communicator.go index 24981e6f3..34baf4b6f 100644 --- a/helper/ssh/communicator.go +++ b/helper/ssh/communicator.go @@ -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)