"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
sftp: fixup formatting and golint warnings
Nick Craig-Wood74687c25f55a
diff --git a/sftp/sftp.go b/sftp/sftp.goindex 966db9b12..d67948c4e 100644--- a/sftp/sftp.go+++ b/sftp/sftp.go@@ -9,6 +9,8 @@ import ("io/ioutil""os""path"+ "regexp"+ "strings""time""github.com/ncw/rclone/fs"@@ -16,8 +18,6 @@ import ("github.com/pkg/sftp""github.com/xanzy/ssh-agent""golang.org/x/crypto/ssh"- "strings"- "regexp")func init() {@@ -437,6 +437,7 @@ func (f *Fs) DirMove(src fs.Fs, srcRemote, dstRemote string) error {return nil}+// Hashes returns the supported hash types of the filesystemfunc (f *Fs) Hashes() fs.HashSet {if f.cachedHashes != nil {return *f.cachedHashes@@ -461,7 +462,7 @@ func (f *Fs) Hashes() fs.HashSet {sha1Works := parseHash(sha1Output) == expectedSha1md5Works := parseHash(md5Output) == expectedMd5- var set fs.HashSet = fs.NewHashSet()+ set := fs.NewHashSet()if !sha1Works && !md5Works {set.Add(fs.HashNone)}@@ -495,6 +496,8 @@ func (o *Object) Remote() string {return o.remote}+// Hash returns the selected checksum of the file+// If no checksum is available it returns ""func (o *Object) Hash(r fs.HashType) (string, error) {if r == fs.HashMD5 && o.md5sum != nil {return *o.md5sum, nildiff --git a/sftp/sftp_internal_test.go b/sftp/sftp_internal_test.goindex 820c4e02f..5b5f6feb3 100644--- a/sftp/sftp_internal_test.go+++ b/sftp/sftp_internal_test.go@@ -1,9 +1,10 @@package sftpimport (+ "fmt""testing"+"github.com/stretchr/testify/assert"- "fmt")func TestShellEscape(t *testing.T) {