"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
package readers
import (
"bytes"
"io"
"testing"
"github.com/stretchr/testify/assert"
)
func TestNoSeeker(t *testing.T) {
r := bytes.NewBufferString("hello")
rs := NoSeeker{Reader: r}
// Check read
b := make([]byte, 4)
n, err := rs.Read(b)
assert.NoError(t, err)
assert.Equal(t, 4, n)
assert.Equal(t, []byte("hell"), b)
// Check seek
_, err = rs.Seek(0, io.SeekCurrent)
assert.Equal(t, errCantSeek, err)
}
// check interfaces
var (
_ io.Reader = NoSeeker{}
_ io.Seeker = NoSeeker{}
)