From 58daecd98f7bda33e19ae0e785a4b874d17416a5 Mon Sep 17 00:00:00 2001 From: Katie Hrenchir Date: Mon, 27 Sep 2021 14:21:52 -0500 Subject: [PATCH 01/12] Allow multiple kex algos --- backend/sftp/options.go | 6 +++--- backend/sftp/options_test.go | 2 +- docs/sftp.md | 7 ++++++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/backend/sftp/options.go b/backend/sftp/options.go index 2236e9c2..441c2467 100644 --- a/backend/sftp/options.go +++ b/backend/sftp/options.go @@ -26,7 +26,7 @@ type Options struct { KeyPassphrase string `json:"keyPassphrase,omitempty"` // env var VFS_SFTP_KEYFILE_PASSPHRASE KnownHostsFile string `json:"knownHostsFile,omitempty"` // env var VFS_SFTP_KNOWN_HOSTS_FILE KnownHostsString string `json:"knownHostsString,omitempty"` - KeyExchanges string `json:"keyExchanges,omitempty"` + KeyExchanges []string `json:"keyExchanges,omitempty"` AutoDisconnect int `json:"autoDisconnect,omitempty"` // seconds before disconnecting. default: 10 KnownHostsCallback ssh.HostKeyCallback // env var VFS_SFTP_INSECURE_KNOWN_HOSTS Retry vfs.Retry @@ -56,9 +56,9 @@ func getClient(authority utils.Authority, opts Options) (Client, error) { // server offered: [diffie-hellman-group-exchange-sha256 ] // Now receive KeyExchange algorithm as an option sshConfig := ssh.Config{} - if opts.KeyExchanges != "" { + if len(opts.KeyExchanges) != 0 { sshConfig = ssh.Config{ - KeyExchanges: []string{opts.KeyExchanges}, + KeyExchanges: opts.KeyExchanges, } } // Define the Client Config diff --git a/backend/sftp/options_test.go b/backend/sftp/options_test.go index 0f039672..dfdf23a5 100644 --- a/backend/sftp/options_test.go +++ b/backend/sftp/options_test.go @@ -338,7 +338,7 @@ func (o *optionsSuite) TestGetAuthMethods() { KeyFilePath: o.keyFiles.SSHPrivateKey, KeyPassphrase: o.keyFiles.passphrase, Password: "somepassword", - KeyExchanges: "diffie-hellman-group-exchange-sha256", + KeyExchanges: []string{"diffie-hellman-group-exchange-sha256"}, }, returnCount: 2, hasError: false, diff --git a/docs/sftp.md b/docs/sftp.md index 46b0ccff..828ae1fd 100644 --- a/docs/sftp.md +++ b/docs/sftp.md @@ -154,6 +154,11 @@ testing but should not be used in production. ### Other Options +Passing in multiple key exchange algorithms is supported - these are specified as a slice. +``` +'{"keyFilePath":"hsbc_uat_rsa", "keyExchanges":["diffie-hellman-group-a256"]}' +``` + #### AutoDisconnect When dialing an TCP connection, go doesn't disconnect for you, even when the connection fall out of scope (or even when garbage collection is forced). It must be explicitly closed. Unfortunately, VFS.FileSystem has no explicit close mechanism. @@ -569,7 +574,7 @@ type Options struct { KeyPassphrase string `json:"keyPassphrase,omitempty"` // env var VFS_SFTP_KEYFILE_PASSPHRASE KnownHostsFile string `json:"knownHostsFile,omitempty"` // env var VFS_SFTP_KNOWN_HOSTS_FILE KnownHostsString string `json:"knownHostsString,omitempty"` - KeyExchanges string `json:"keyExchanges,omitempty"` + KeyExchanges []string `json:"keyExchanges,omitempty"` KnownHostsCallback ssh.HostKeyCallback //env var VFS_SFTP_INSECURE_KNOWN_HOSTS Retry vfs.Retry MaxRetries int From 254f491d7d0fcde2ed2b1db17fc50193fa0a9cd9 Mon Sep 17 00:00:00 2001 From: Katie Hrenchir Date: Tue, 28 Sep 2021 11:04:22 -0500 Subject: [PATCH 02/12] Add test for multiple key exchange algorithms --- backend/sftp/options_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/backend/sftp/options_test.go b/backend/sftp/options_test.go index dfdf23a5..0a67c220 100644 --- a/backend/sftp/options_test.go +++ b/backend/sftp/options_test.go @@ -345,6 +345,16 @@ func (o *optionsSuite) TestGetAuthMethods() { errMessage: "", message: "multiple auths", }, + { + options: Options{ + Password: "somepassword", + KeyExchanges: []string{"diffie-hellman-group-exchange-sha256", "ecdh-sha2-nistp256"}, + }, + returnCount: 1, + hasError: false, + errMessage: "", + message: "multiple key exchange algorithms", + }, { envVars: map[string]string{ "VFS_SFTP_KEYFILE": "nonexistent.key", From 941a0c6fcc6c04cb67d4d9c751b7c2341a450d29 Mon Sep 17 00:00:00 2001 From: Katie Hrenchir Date: Wed, 29 Sep 2021 09:45:15 -0500 Subject: [PATCH 03/12] Update sftp doc to show two kex and make more generic --- docs/sftp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sftp.md b/docs/sftp.md index 828ae1fd..71f3d34d 100644 --- a/docs/sftp.md +++ b/docs/sftp.md @@ -156,7 +156,7 @@ testing but should not be used in production. Passing in multiple key exchange algorithms is supported - these are specified as a slice. ``` -'{"keyFilePath":"hsbc_uat_rsa", "keyExchanges":["diffie-hellman-group-a256"]}' +"keyExchanges":["diffie-hellman-group-a256", "ecdh-sha2-nistp256"] ``` #### AutoDisconnect From 0c353a9e2e83696af691341fe5a0ebf049ae0f85 Mon Sep 17 00:00:00 2001 From: Katie Hrenchir Date: Wed, 29 Sep 2021 09:50:21 -0500 Subject: [PATCH 04/12] Add changelog entry --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 779b4691..2b866da6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [6.0.0] - 2021-09-29 +### Changed +- Modified sftp Key Exchange option to accept an array instead of a string, allowing multiple kex algorithms + ## [5.10.0] - 2021-09-16 ### Changed - Modified S3 file.go so that on the initial read when the remote file is downloaded, a temporary file is locally created From 0eba0feb9eaaf097964b72b5941e6f78cb6e0d73 Mon Sep 17 00:00:00 2001 From: Katie Hrenchir Date: Mon, 4 Oct 2021 15:28:55 -0500 Subject: [PATCH 05/12] Update backend docs & always set KeyExchanges in ssh config --- backend/sftp/doc.go | 6 ++++++ backend/sftp/options.go | 8 ++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/backend/sftp/doc.go b/backend/sftp/doc.go index 94ab1962..d57b47e3 100644 --- a/backend/sftp/doc.go +++ b/backend/sftp/doc.go @@ -127,5 +127,11 @@ your info (man-in-the-middle attack). Handling for this can be accomplished via SSH doesn't exist natively on Windows and each third-party implementation has a different location for known_hosts. Because of this, no attempt is made to find a system-wide file for Windows. It's better to specify in KnownHostsFile in that case. +OTHER OPTIONS + +Passing in multiple key exchange algorithms is supported - these are specified as a slice. +Example: +`"keyExchanges":["diffie-hellman-group-a256", "ecdh-sha2-nistp256"]` + */ package sftp diff --git a/backend/sftp/options.go b/backend/sftp/options.go index 441c2467..9712dc13 100644 --- a/backend/sftp/options.go +++ b/backend/sftp/options.go @@ -55,12 +55,8 @@ func getClient(authority utils.Authority, opts Options) (Client, error) { // client offered: [curve25519-sha256@libssh.org ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2- nistp521 diffie-hellman-group14-sha1], // server offered: [diffie-hellman-group-exchange-sha256 ] // Now receive KeyExchange algorithm as an option - sshConfig := ssh.Config{} - if len(opts.KeyExchanges) != 0 { - sshConfig = ssh.Config{ - KeyExchanges: opts.KeyExchanges, - } - } + sshConfig := ssh.Config{KeyExchanges: opts.KeyExchanges} + // Define the Client Config config := &ssh.ClientConfig{ User: authority.User, From 6dff805061b88721f0b1916874fa09390ce438f2 Mon Sep 17 00:00:00 2001 From: Katie Hrenchir Date: Mon, 4 Oct 2021 15:37:19 -0500 Subject: [PATCH 06/12] Update instructions added to changelog --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b866da6..0aebf1a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Modified sftp Key Exchange option to accept an array instead of a string, allowing multiple kex algorithms +### Upgrade steps + +With v6.0.0, we changed the Auth creation options to accept an array of Key Exchange algorithms rather than a string. To update, change the syntax of the auth commands. +``` +"keyExchanges":"diffie-hellman-group-a256" +``` +becomes +``` +"keyExchanges":["diffie-hellman-group-a256"] +``` + ## [5.10.0] - 2021-09-16 ### Changed - Modified S3 file.go so that on the initial read when the remote file is downloaded, a temporary file is locally created From af60ba4727c14fea5a8cc721cf6d94ae095e9ddf Mon Sep 17 00:00:00 2001 From: Katie Hrenchir Date: Mon, 4 Oct 2021 16:41:20 -0500 Subject: [PATCH 07/12] Update main doc.go with go install and upgrade instructions --- doc.go | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/doc.go b/doc.go index 2e7b8323..60db340a 100644 --- a/doc.go +++ b/doc.go @@ -37,8 +37,20 @@ What we needed/wanted was the following(and more): Install -Go install: - go get -u github.com/c2fo/vfs/v5 +Pre 1.17: + go get -u github.com/c2fo/vfs/v6 + +Post 1.17: + go install -u github.com/c2fo/vfs/v6 + + +Upgrading + +Upgrading from v5 to v6 +With v6.0.0, we changed the Auth creation options to accept an array of Key Exchange algorithms rather than a string. To update, change the syntax of the auth commands. + "keyExchanges":"diffie-hellman-group-a256" +becomes + "keyExchanges":["diffie-hellman-group-a256"] Usage From 7743a5283d3b84f10184c7a6047815e0e4052645 Mon Sep 17 00:00:00 2001 From: Katie Hrenchir Date: Mon, 4 Oct 2021 17:03:57 -0500 Subject: [PATCH 08/12] Update references to /vfs/v5 to /vfs/v6 --- README.md | 4 ++-- backend/all/all.go | 12 ++++++------ backend/azure/client.go | 4 ++-- backend/azure/doc.go | 6 +++--- backend/azure/file.go | 6 +++--- backend/azure/fileSystem.go | 6 +++--- backend/azure/fileSystem_test.go | 2 +- backend/azure/file_test.go | 4 ++-- backend/azure/location.go | 4 ++-- backend/azure/location_test.go | 2 +- backend/azure/mock_client.go | 2 +- backend/azure/options.go | 2 +- backend/backend.go | 2 +- backend/backend_test.go | 2 +- backend/doc.go | 12 ++++++------ backend/gs/bucketHandleWrapper.go | 2 +- backend/gs/doc.go | 6 +++--- backend/gs/file.go | 6 +++--- backend/gs/fileSystem.go | 6 +++--- backend/gs/file_test.go | 2 +- backend/gs/location.go | 4 ++-- backend/gs/location_test.go | 2 +- backend/gs/objectHandleWrapper.go | 2 +- backend/gs/options.go | 2 +- backend/helpers.go | 2 +- backend/mem/doc.go | 8 ++++---- backend/mem/file.go | 6 +++--- backend/mem/fileSystem.go | 6 +++--- backend/mem/file_test.go | 6 +++--- backend/mem/location.go | 4 ++-- backend/mem/location_test.go | 2 +- backend/os/doc.go | 8 ++++---- backend/os/file.go | 6 +++--- backend/os/fileSystem.go | 6 +++--- backend/os/fileSystem_test.go | 4 ++-- backend/os/file_test.go | 6 +++--- backend/os/location.go | 4 ++-- backend/os/location_test.go | 4 ++-- backend/s3/doc.go | 8 ++++---- backend/s3/file.go | 8 ++++---- backend/s3/fileSystem.go | 6 +++--- backend/s3/fileSystem_test.go | 2 +- backend/s3/file_test.go | 6 +++--- backend/s3/location.go | 4 ++-- backend/s3/location_test.go | 4 ++-- backend/sftp/doc.go | 8 ++++---- backend/sftp/file.go | 4 ++-- backend/sftp/fileSystem.go | 6 +++--- backend/sftp/fileSystem_test.go | 6 +++--- backend/sftp/file_test.go | 8 ++++---- backend/sftp/location.go | 4 ++-- backend/sftp/location_test.go | 4 ++-- backend/sftp/options.go | 4 ++-- backend/sftp/options_test.go | 2 +- backend/testsuite/backend_integration_test.go | 18 +++++++++--------- docs/azure.md | 6 +++--- docs/backend.md | 12 ++++++------ docs/gs.md | 8 ++++---- docs/mem.md | 8 ++++---- docs/os.md | 8 ++++---- docs/s3.md | 8 ++++---- docs/sftp.md | 8 ++++---- docs/utils.md | 2 +- docs/vfssimple.md | 12 ++++++------ go.mod | 2 +- mocks/File.go | 2 +- mocks/FileSystem.go | 2 +- mocks/Location.go | 2 +- utils/utils.go | 2 +- utils/utils_test.go | 6 +++--- vfscp/vfscp.go | 2 +- vfssimple/doc.go | 8 ++++---- vfssimple/vfssimple.go | 8 ++++---- 73 files changed, 191 insertions(+), 191 deletions(-) diff --git a/README.md b/README.md index 88ca2a37..0a1f6fd1 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![GitHub tag](https://img.shields.io/github/tag/c2fo/vfs.svg?style=flat)](https://github.com/c2fo/vfs/releases) [![Build Status](https://travis-ci.org/C2FO/vfs.svg?branch=master)](https://travis-ci.org/C2FO/vfs) -[![GoDoc](https://pkg.go.dev/badge/github.com/c2fo/vfs/v5?utm_source=godoc)](https://pkg.go.dev/github.com/c2fo/vfs/v5) +[![GoDoc](https://pkg.go.dev/badge/github.com/c2fo/vfs/v6?utm_source=godoc)](https://pkg.go.dev/github.com/c2fo/vfs/v6) [![codecov](https://codecov.io/gh/c2fo/vfs/branch/master/graph/badge.svg)](https://codecov.io/gh/c2fo/vfs) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](License.md) [![Go Report Card](https://goreportcard.com/badge/github.com/c2fo/vfs)](https://goreportcard.com/report/github.com/c2fo/vfs) @@ -62,7 +62,7 @@ file system backends. Go install: - go get -u github.com/c2fo/vfs/v5 + go get -u github.com/c2fo/vfs/v6 ### Usage diff --git a/backend/all/all.go b/backend/all/all.go index 84489a7c..75faffbe 100644 --- a/backend/all/all.go +++ b/backend/all/all.go @@ -2,10 +2,10 @@ package all import ( - _ "github.com/c2fo/vfs/v5/backend/azure" // register azure backend - _ "github.com/c2fo/vfs/v5/backend/gs" // register gs backend - _ "github.com/c2fo/vfs/v5/backend/mem" // register mem backend - _ "github.com/c2fo/vfs/v5/backend/os" // register os backend - _ "github.com/c2fo/vfs/v5/backend/s3" // register s3 backend - _ "github.com/c2fo/vfs/v5/backend/sftp" // register sftp backend + _ "github.com/c2fo/vfs/v6/backend/azure" // register azure backend + _ "github.com/c2fo/vfs/v6/backend/gs" // register gs backend + _ "github.com/c2fo/vfs/v6/backend/mem" // register mem backend + _ "github.com/c2fo/vfs/v6/backend/os" // register os backend + _ "github.com/c2fo/vfs/v6/backend/s3" // register s3 backend + _ "github.com/c2fo/vfs/v6/backend/sftp" // register sftp backend ) diff --git a/backend/azure/client.go b/backend/azure/client.go index 69b9e851..ff057243 100644 --- a/backend/azure/client.go +++ b/backend/azure/client.go @@ -11,8 +11,8 @@ import ( "github.com/Azure/azure-pipeline-go/pipeline" "github.com/Azure/azure-storage-blob-go/azblob" - "github.com/c2fo/vfs/v5" - "github.com/c2fo/vfs/v5/utils" + "github.com/c2fo/vfs/v6" + "github.com/c2fo/vfs/v6/utils" ) // The Client interface contains methods that perform specific operations to Azure Blob Storage. This interface is diff --git a/backend/azure/doc.go b/backend/azure/doc.go index a9517fba..27c851cb 100644 --- a/backend/azure/doc.go +++ b/backend/azure/doc.go @@ -6,8 +6,8 @@ Usage Rely on github.com/c2fo/vfs/backend import( - "github.com/c2fo/vfs/v5/backend" - "github.com/c2fo/vfs/v5/backend/azure" + "github.com/c2fo/vfs/v6/backend" + "github.com/c2fo/vfs/v6/backend/azure" ) func UseFs() error { @@ -17,7 +17,7 @@ Rely on github.com/c2fo/vfs/backend Or call directly: - import "github.com/c2fo/vfs/v5/backend/azure" + import "github.com/c2fo/vfs/v6/backend/azure" func DoSomething() { fs := azure.NewFilesystem() diff --git a/backend/azure/file.go b/backend/azure/file.go index 3ee92ced..da7e53bb 100644 --- a/backend/azure/file.go +++ b/backend/azure/file.go @@ -11,9 +11,9 @@ import ( "github.com/Azure/azure-storage-blob-go/azblob" - "github.com/c2fo/vfs/v5" - "github.com/c2fo/vfs/v5/backend" - "github.com/c2fo/vfs/v5/utils" + "github.com/c2fo/vfs/v6" + "github.com/c2fo/vfs/v6/backend" + "github.com/c2fo/vfs/v6/utils" ) // File implements the vfs.File interface for Azure Blob Storage diff --git a/backend/azure/fileSystem.go b/backend/azure/fileSystem.go index 3a701b9e..33729efd 100644 --- a/backend/azure/fileSystem.go +++ b/backend/azure/fileSystem.go @@ -9,9 +9,9 @@ import ( "regexp" "strings" - "github.com/c2fo/vfs/v5" - "github.com/c2fo/vfs/v5/backend" - "github.com/c2fo/vfs/v5/utils" + "github.com/c2fo/vfs/v6" + "github.com/c2fo/vfs/v6/backend" + "github.com/c2fo/vfs/v6/utils" ) // Scheme defines the scheme for the azure implementation diff --git a/backend/azure/fileSystem_test.go b/backend/azure/fileSystem_test.go index e9decbc3..f315f8e9 100644 --- a/backend/azure/fileSystem_test.go +++ b/backend/azure/fileSystem_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/suite" - "github.com/c2fo/vfs/v5" + "github.com/c2fo/vfs/v6" ) type FileSystemTestSuite struct { diff --git a/backend/azure/file_test.go b/backend/azure/file_test.go index 4fc7176c..1ee78091 100644 --- a/backend/azure/file_test.go +++ b/backend/azure/file_test.go @@ -10,8 +10,8 @@ import ( "github.com/stretchr/testify/suite" - "github.com/c2fo/vfs/v5" - "github.com/c2fo/vfs/v5/utils" + "github.com/c2fo/vfs/v6" + "github.com/c2fo/vfs/v6/utils" ) type FileTestSuite struct { diff --git a/backend/azure/location.go b/backend/azure/location.go index 1f6c0786..6848fa56 100644 --- a/backend/azure/location.go +++ b/backend/azure/location.go @@ -7,8 +7,8 @@ import ( "regexp" "strings" - "github.com/c2fo/vfs/v5" - "github.com/c2fo/vfs/v5/utils" + "github.com/c2fo/vfs/v6" + "github.com/c2fo/vfs/v6/utils" ) const errNilLocationReceiver = "azure.Location receiver pointer must be non-nil" diff --git a/backend/azure/location_test.go b/backend/azure/location_test.go index d34a8d80..34234ec1 100644 --- a/backend/azure/location_test.go +++ b/backend/azure/location_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/suite" - "github.com/c2fo/vfs/v5" + "github.com/c2fo/vfs/v6" ) type LocationTestSuite struct { diff --git a/backend/azure/mock_client.go b/backend/azure/mock_client.go index f603a856..926a36ef 100644 --- a/backend/azure/mock_client.go +++ b/backend/azure/mock_client.go @@ -6,7 +6,7 @@ import ( "github.com/Azure/azure-storage-blob-go/azblob" - "github.com/c2fo/vfs/v5" + "github.com/c2fo/vfs/v6" ) // MockAzureClient is a mock implementation of azure.Client. diff --git a/backend/azure/options.go b/backend/azure/options.go index 5da9d7ba..7be5a1bc 100644 --- a/backend/azure/options.go +++ b/backend/azure/options.go @@ -3,7 +3,7 @@ package azure import ( "os" - "github.com/c2fo/vfs/v5" + "github.com/c2fo/vfs/v6" "github.com/Azure/azure-storage-blob-go/azblob" ) diff --git a/backend/backend.go b/backend/backend.go index 458346a0..2099671a 100644 --- a/backend/backend.go +++ b/backend/backend.go @@ -4,7 +4,7 @@ import ( "sort" "sync" - "github.com/c2fo/vfs/v5" + "github.com/c2fo/vfs/v6" ) var mmu sync.RWMutex diff --git a/backend/backend_test.go b/backend/backend_test.go index 241f0b40..736dc9bb 100644 --- a/backend/backend_test.go +++ b/backend/backend_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/suite" - "github.com/c2fo/vfs/v5/mocks" + "github.com/c2fo/vfs/v6/mocks" ) /********************************** diff --git a/backend/doc.go b/backend/doc.go index e9f0551e..1aee26a4 100644 --- a/backend/doc.go +++ b/backend/doc.go @@ -8,9 +8,9 @@ In this way, a caller of vfs backends can simply load the backend file system (a // import backend and each backend you intend to use import( - "github.com/c2fo/vfs/v5/backend" - "github.com/c2fo/vfs/v5/backend/os" - "github.com/c2fo/vfs/v5/backend/s3" + "github.com/c2fo/vfs/v6/backend" + "github.com/c2fo/vfs/v6/backend/os" + "github.com/c2fo/vfs/v6/backend/s3" ) func main() { @@ -43,8 +43,8 @@ Then ensure it registers itself on load: import( ... - "github.com/c2fo/vfs/v5" - "github.com/c2fo/vfs/v5/backend" + "github.com/c2fo/vfs/v6" + "github.com/c2fo/vfs/v6/backend" ) // IMPLEMENT vfs interfaces @@ -59,7 +59,7 @@ Then do use it in some other package do package MyExoticFileSystem import( - "github.com/c2fo/vfs/v5/backend" + "github.com/c2fo/vfs/v6/backend" "github.com/acme/myexoticfilesystem" ) diff --git a/backend/gs/bucketHandleWrapper.go b/backend/gs/bucketHandleWrapper.go index e3af5447..15063b48 100644 --- a/backend/gs/bucketHandleWrapper.go +++ b/backend/gs/bucketHandleWrapper.go @@ -5,7 +5,7 @@ import ( "cloud.google.com/go/storage" - "github.com/c2fo/vfs/v5" + "github.com/c2fo/vfs/v6" ) // BucketHandle is an interface which contains a subset of the functions provided diff --git a/backend/gs/doc.go b/backend/gs/doc.go index dd341b29..9534453a 100644 --- a/backend/gs/doc.go +++ b/backend/gs/doc.go @@ -6,8 +6,8 @@ Usage Rely on github.com/c2fo/vfs/backend import( - "github.com/c2fo/vfs/v5/backend" - "github.com/c2fo/vfs/v5/backend/gs" + "github.com/c2fo/vfs/v6/backend" + "github.com/c2fo/vfs/v6/backend/gs" ) func UseFs() error { @@ -17,7 +17,7 @@ Rely on github.com/c2fo/vfs/backend Or call directly: - import "github.com/c2fo/vfs/v5/backend/gs" + import "github.com/c2fo/vfs/v6/backend/gs" func DoSomething() { fs := gs.NewFilesystem() diff --git a/backend/gs/file.go b/backend/gs/file.go index 81602ccd..0053d22a 100644 --- a/backend/gs/file.go +++ b/backend/gs/file.go @@ -12,9 +12,9 @@ import ( "cloud.google.com/go/storage" - "github.com/c2fo/vfs/v5" - "github.com/c2fo/vfs/v5/backend" - "github.com/c2fo/vfs/v5/utils" + "github.com/c2fo/vfs/v6" + "github.com/c2fo/vfs/v6/backend" + "github.com/c2fo/vfs/v6/utils" ) const ( diff --git a/backend/gs/fileSystem.go b/backend/gs/fileSystem.go index 83f38079..de9075e4 100644 --- a/backend/gs/fileSystem.go +++ b/backend/gs/fileSystem.go @@ -7,9 +7,9 @@ import ( "cloud.google.com/go/storage" "golang.org/x/net/context" - "github.com/c2fo/vfs/v5" - "github.com/c2fo/vfs/v5/backend" - "github.com/c2fo/vfs/v5/utils" + "github.com/c2fo/vfs/v6" + "github.com/c2fo/vfs/v6/backend" + "github.com/c2fo/vfs/v6/utils" ) // Scheme defines the file system type. diff --git a/backend/gs/file_test.go b/backend/gs/file_test.go index ec808486..6691100f 100644 --- a/backend/gs/file_test.go +++ b/backend/gs/file_test.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" - "github.com/c2fo/vfs/v5/utils" + "github.com/c2fo/vfs/v6/utils" ) type fileTestSuite struct { diff --git a/backend/gs/location.go b/backend/gs/location.go index 21aa33fe..69c29cee 100644 --- a/backend/gs/location.go +++ b/backend/gs/location.go @@ -9,8 +9,8 @@ import ( "cloud.google.com/go/storage" "google.golang.org/api/iterator" - "github.com/c2fo/vfs/v5" - "github.com/c2fo/vfs/v5/utils" + "github.com/c2fo/vfs/v6" + "github.com/c2fo/vfs/v6/utils" ) // Location implements vfs.Location for gs fs. diff --git a/backend/gs/location_test.go b/backend/gs/location_test.go index 9639688b..4d65ab91 100644 --- a/backend/gs/location_test.go +++ b/backend/gs/location_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" - "github.com/c2fo/vfs/v5/utils" + "github.com/c2fo/vfs/v6/utils" "github.com/fsouza/fake-gcs-server/fakestorage" ) diff --git a/backend/gs/objectHandleWrapper.go b/backend/gs/objectHandleWrapper.go index bb14bbfb..8bf8fb93 100644 --- a/backend/gs/objectHandleWrapper.go +++ b/backend/gs/objectHandleWrapper.go @@ -6,7 +6,7 @@ import ( "cloud.google.com/go/storage" "google.golang.org/api/iterator" - "github.com/c2fo/vfs/v5" + "github.com/c2fo/vfs/v6" ) // ObjectHandleWrapper is an interface which contains a subset of the functions provided diff --git a/backend/gs/options.go b/backend/gs/options.go index 7d509f7a..bba02f5a 100644 --- a/backend/gs/options.go +++ b/backend/gs/options.go @@ -3,7 +3,7 @@ package gs import ( "google.golang.org/api/option" - "github.com/c2fo/vfs/v5" + "github.com/c2fo/vfs/v6" ) // Options holds Google Cloud Storage -specific options. Currently only client options are used. diff --git a/backend/helpers.go b/backend/helpers.go index 4e24ef4d..6484d984 100644 --- a/backend/helpers.go +++ b/backend/helpers.go @@ -4,7 +4,7 @@ import ( "fmt" "io" - "github.com/c2fo/vfs/v5" + "github.com/c2fo/vfs/v6" ) func ValidateCopySeekPosition(f vfs.File) error { diff --git a/backend/mem/doc.go b/backend/mem/doc.go index 62b00c34..ac1c0d91 100644 --- a/backend/mem/doc.go +++ b/backend/mem/doc.go @@ -1,17 +1,17 @@ /* Package mem built-in mem lib VFS implementation. Usage -Rely on github.com/c2fo/vfs/v5/backend +Rely on github.com/c2fo/vfs/v6/backend import( - "github.com/c2fo/vfs/v5/backend" - "github.com/c2fo/vfs/v5/backend/mem" + "github.com/c2fo/vfs/v6/backend" + "github.com/c2fo/vfs/v6/backend/mem" ) func UseFs() error { fs := backend.Backend(mem.Scheme) ... } Or call directly: - import _mem "github.com/c2fo/vfs/v5/backend/mem" + import _mem "github.com/c2fo/vfs/v6/backend/mem" func DoSomething() { fs := _mem.NewFileSystem() ... diff --git a/backend/mem/file.go b/backend/mem/file.go index eab771ac..36786bee 100644 --- a/backend/mem/file.go +++ b/backend/mem/file.go @@ -8,9 +8,9 @@ import ( "sync" "time" - "github.com/c2fo/vfs/v5" - "github.com/c2fo/vfs/v5/backend" - "github.com/c2fo/vfs/v5/utils" + "github.com/c2fo/vfs/v6" + "github.com/c2fo/vfs/v6/backend" + "github.com/c2fo/vfs/v6/utils" ) // diff --git a/backend/mem/fileSystem.go b/backend/mem/fileSystem.go index 24e017a4..1afae079 100644 --- a/backend/mem/fileSystem.go +++ b/backend/mem/fileSystem.go @@ -4,9 +4,9 @@ import ( "path" "sync" - "github.com/c2fo/vfs/v5" - "github.com/c2fo/vfs/v5/backend" - "github.com/c2fo/vfs/v5/utils" + "github.com/c2fo/vfs/v6" + "github.com/c2fo/vfs/v6/backend" + "github.com/c2fo/vfs/v6/utils" ) // Scheme defines the FileSystem type's underlying implementation. diff --git a/backend/mem/file_test.go b/backend/mem/file_test.go index de53001c..f4255b88 100644 --- a/backend/mem/file_test.go +++ b/backend/mem/file_test.go @@ -12,9 +12,9 @@ import ( "github.com/stretchr/testify/suite" - "github.com/c2fo/vfs/v5" - "github.com/c2fo/vfs/v5/backend" - _os "github.com/c2fo/vfs/v5/backend/os" + "github.com/c2fo/vfs/v6" + "github.com/c2fo/vfs/v6/backend" + _os "github.com/c2fo/vfs/v6/backend/os" ) /********************************** diff --git a/backend/mem/location.go b/backend/mem/location.go index facba74f..23290aa3 100644 --- a/backend/mem/location.go +++ b/backend/mem/location.go @@ -7,8 +7,8 @@ import ( "sort" "strings" - "github.com/c2fo/vfs/v5" - "github.com/c2fo/vfs/v5/utils" + "github.com/c2fo/vfs/v6" + "github.com/c2fo/vfs/v6/utils" ) // Location implements the vfs.Location interface specific to in-memory FileSystem. diff --git a/backend/mem/location_test.go b/backend/mem/location_test.go index 267d3cdc..ac1c0730 100644 --- a/backend/mem/location_test.go +++ b/backend/mem/location_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/suite" - "github.com/c2fo/vfs/v5" + "github.com/c2fo/vfs/v6" ) /********************************** diff --git a/backend/os/doc.go b/backend/os/doc.go index 87cf1e4f..9e76182b 100644 --- a/backend/os/doc.go +++ b/backend/os/doc.go @@ -3,11 +3,11 @@ Package os built-in os lib VFS implementation. Usage -Rely on github.com/c2fo/vfs/v5/backend +Rely on github.com/c2fo/vfs/v6/backend import( - "github.com/c2fo/vfs/v5/backend" - "github.com/c2fo/vfs/v5/backend/os" + "github.com/c2fo/vfs/v6/backend" + "github.com/c2fo/vfs/v6/backend/os" ) func UseFs() error { @@ -17,7 +17,7 @@ Rely on github.com/c2fo/vfs/v5/backend Or call directly: - import _os "github.com/c2fo/vfs/v5/backend/os" + import _os "github.com/c2fo/vfs/v6/backend/os" func DoSomething() { fs := &_os.FileSystem{} diff --git a/backend/os/file.go b/backend/os/file.go index 6c9155aa..a2cadb5b 100644 --- a/backend/os/file.go +++ b/backend/os/file.go @@ -9,9 +9,9 @@ import ( "path/filepath" "time" - "github.com/c2fo/vfs/v5" - "github.com/c2fo/vfs/v5/backend" - "github.com/c2fo/vfs/v5/utils" + "github.com/c2fo/vfs/v6" + "github.com/c2fo/vfs/v6/backend" + "github.com/c2fo/vfs/v6/utils" ) const osCrossDeviceLinkError = "invalid cross-device link" diff --git a/backend/os/fileSystem.go b/backend/os/fileSystem.go index 108db3c9..415dd814 100644 --- a/backend/os/fileSystem.go +++ b/backend/os/fileSystem.go @@ -3,9 +3,9 @@ package os import ( "path" - "github.com/c2fo/vfs/v5" - "github.com/c2fo/vfs/v5/backend" - "github.com/c2fo/vfs/v5/utils" + "github.com/c2fo/vfs/v6" + "github.com/c2fo/vfs/v6/backend" + "github.com/c2fo/vfs/v6/utils" ) // Scheme defines the file system type. diff --git a/backend/os/fileSystem_test.go b/backend/os/fileSystem_test.go index 517e2510..b5a0508f 100644 --- a/backend/os/fileSystem_test.go +++ b/backend/os/fileSystem_test.go @@ -5,8 +5,8 @@ import ( "github.com/stretchr/testify/suite" - "github.com/c2fo/vfs/v5" - "github.com/c2fo/vfs/v5/utils" + "github.com/c2fo/vfs/v6" + "github.com/c2fo/vfs/v6/utils" ) /********************************** diff --git a/backend/os/file_test.go b/backend/os/file_test.go index 26f0feb1..0bda6d18 100644 --- a/backend/os/file_test.go +++ b/backend/os/file_test.go @@ -11,9 +11,9 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/suite" - "github.com/c2fo/vfs/v5" - "github.com/c2fo/vfs/v5/mocks" - "github.com/c2fo/vfs/v5/utils" + "github.com/c2fo/vfs/v6" + "github.com/c2fo/vfs/v6/mocks" + "github.com/c2fo/vfs/v6/utils" ) /********************************** diff --git a/backend/os/location.go b/backend/os/location.go index 2b5bc337..83b0a8ba 100644 --- a/backend/os/location.go +++ b/backend/os/location.go @@ -9,8 +9,8 @@ import ( "regexp" "strings" - "github.com/c2fo/vfs/v5" - "github.com/c2fo/vfs/v5/utils" + "github.com/c2fo/vfs/v6" + "github.com/c2fo/vfs/v6/utils" ) // Location implements the vfs.Location interface specific to OS fs. diff --git a/backend/os/location_test.go b/backend/os/location_test.go index 06a2e7cf..29df19d5 100644 --- a/backend/os/location_test.go +++ b/backend/os/location_test.go @@ -9,8 +9,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" - "github.com/c2fo/vfs/v5" - "github.com/c2fo/vfs/v5/utils" + "github.com/c2fo/vfs/v6" + "github.com/c2fo/vfs/v6/utils" ) /********************************** diff --git a/backend/s3/doc.go b/backend/s3/doc.go index 65030c08..5e482772 100644 --- a/backend/s3/doc.go +++ b/backend/s3/doc.go @@ -3,11 +3,11 @@ Package s3 AWS S3 VFS implementation. Usage -Rely on github.com/c2fo/vfs/v5/backend +Rely on github.com/c2fo/vfs/v6/backend import( - "github.com/c2fo/vfs/v5/backend" - "github.com/c2fo/vfs/v5/backend/s3" + "github.com/c2fo/vfs/v6/backend" + "github.com/c2fo/vfs/v6/backend/s3" ) func UseFs() error { @@ -17,7 +17,7 @@ Rely on github.com/c2fo/vfs/v5/backend Or call directly: - import "github.com/c2fo/vfs/v5/backend/s3" + import "github.com/c2fo/vfs/v6/backend/s3" func DoSomething() { fs := s3.NewFileSystem() diff --git a/backend/s3/file.go b/backend/s3/file.go index 4dbbe184..2f9f0dbf 100644 --- a/backend/s3/file.go +++ b/backend/s3/file.go @@ -16,10 +16,10 @@ import ( "github.com/aws/aws-sdk-go/service/s3/s3iface" "github.com/aws/aws-sdk-go/service/s3/s3manager" - "github.com/c2fo/vfs/v5" - "github.com/c2fo/vfs/v5/backend" - "github.com/c2fo/vfs/v5/mocks" - "github.com/c2fo/vfs/v5/utils" + "github.com/c2fo/vfs/v6" + "github.com/c2fo/vfs/v6/backend" + "github.com/c2fo/vfs/v6/mocks" + "github.com/c2fo/vfs/v6/utils" ) // File implements vfs.File interface for S3 fs. diff --git a/backend/s3/fileSystem.go b/backend/s3/fileSystem.go index beff9bdb..836c30f5 100644 --- a/backend/s3/fileSystem.go +++ b/backend/s3/fileSystem.go @@ -8,9 +8,9 @@ import ( "github.com/aws/aws-sdk-go/service/s3" "github.com/aws/aws-sdk-go/service/s3/s3iface" - "github.com/c2fo/vfs/v5" - "github.com/c2fo/vfs/v5/backend" - "github.com/c2fo/vfs/v5/utils" + "github.com/c2fo/vfs/v6" + "github.com/c2fo/vfs/v6/backend" + "github.com/c2fo/vfs/v6/utils" ) // Scheme defines the file system type. diff --git a/backend/s3/fileSystem_test.go b/backend/s3/fileSystem_test.go index af260a1e..38e1b098 100644 --- a/backend/s3/fileSystem_test.go +++ b/backend/s3/fileSystem_test.go @@ -7,7 +7,7 @@ import ( "github.com/aws/aws-sdk-go/service/s3" "github.com/stretchr/testify/suite" - "github.com/c2fo/vfs/v5/utils" + "github.com/c2fo/vfs/v6/utils" ) type fileSystemTestSuite struct { diff --git a/backend/s3/file_test.go b/backend/s3/file_test.go index 256b3906..cb376698 100644 --- a/backend/s3/file_test.go +++ b/backend/s3/file_test.go @@ -19,9 +19,9 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/suite" - "github.com/c2fo/vfs/v5" - "github.com/c2fo/vfs/v5/mocks" - "github.com/c2fo/vfs/v5/utils" + "github.com/c2fo/vfs/v6" + "github.com/c2fo/vfs/v6/mocks" + "github.com/c2fo/vfs/v6/utils" ) type fileTestSuite struct { diff --git a/backend/s3/location.go b/backend/s3/location.go index 4e0cde6c..e6fe0fa1 100644 --- a/backend/s3/location.go +++ b/backend/s3/location.go @@ -9,8 +9,8 @@ import ( "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/s3" - "github.com/c2fo/vfs/v5" - "github.com/c2fo/vfs/v5/utils" + "github.com/c2fo/vfs/v6" + "github.com/c2fo/vfs/v6/utils" ) // Location implements the vfs.Location interface specific to S3 fs. diff --git a/backend/s3/location_test.go b/backend/s3/location_test.go index 1c547d6c..e95f86cb 100644 --- a/backend/s3/location_test.go +++ b/backend/s3/location_test.go @@ -10,8 +10,8 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/suite" - "github.com/c2fo/vfs/v5/mocks" - "github.com/c2fo/vfs/v5/utils" + "github.com/c2fo/vfs/v6/mocks" + "github.com/c2fo/vfs/v6/utils" ) type locationTestSuite struct { diff --git a/backend/sftp/doc.go b/backend/sftp/doc.go index d57b47e3..d84e7d3f 100644 --- a/backend/sftp/doc.go +++ b/backend/sftp/doc.go @@ -3,11 +3,11 @@ Package sftp SFTP VFS implementation. Usage -Rely on github.com/c2fo/vfs/v5/backend +Rely on github.com/c2fo/vfs/v6/backend import( - "github.com/c2fo/vfs/v5/backend" - "github.com/c2fo/vfs/v5/backend/sftp" + "github.com/c2fo/vfs/v6/backend" + "github.com/c2fo/vfs/v6/backend/sftp" ) func UseFs() error { @@ -17,7 +17,7 @@ Rely on github.com/c2fo/vfs/v5/backend Or call directly: - import "github.com/c2fo/vfs/v5/backend/sftp" + import "github.com/c2fo/vfs/v6/backend/sftp" func DoSomething() { fs := sftp.NewFilesystem() diff --git a/backend/sftp/file.go b/backend/sftp/file.go index 554c71bd..cf31f8f8 100644 --- a/backend/sftp/file.go +++ b/backend/sftp/file.go @@ -6,8 +6,8 @@ import ( "path" "time" - "github.com/c2fo/vfs/v5" - "github.com/c2fo/vfs/v5/utils" + "github.com/c2fo/vfs/v6" + "github.com/c2fo/vfs/v6/utils" ) // File implements vfs.File interface for SFTP fs. diff --git a/backend/sftp/fileSystem.go b/backend/sftp/fileSystem.go index bc0d4f08..0aa8c0db 100644 --- a/backend/sftp/fileSystem.go +++ b/backend/sftp/fileSystem.go @@ -11,9 +11,9 @@ import ( _sftp "github.com/pkg/sftp" "golang.org/x/crypto/ssh" - "github.com/c2fo/vfs/v5" - "github.com/c2fo/vfs/v5/backend" - "github.com/c2fo/vfs/v5/utils" + "github.com/c2fo/vfs/v6" + "github.com/c2fo/vfs/v6/backend" + "github.com/c2fo/vfs/v6/utils" ) // Scheme defines the filesystem type. diff --git a/backend/sftp/fileSystem_test.go b/backend/sftp/fileSystem_test.go index a7952f1d..ddf2708e 100644 --- a/backend/sftp/fileSystem_test.go +++ b/backend/sftp/fileSystem_test.go @@ -8,9 +8,9 @@ import ( "github.com/stretchr/testify/suite" - "github.com/c2fo/vfs/v5" - "github.com/c2fo/vfs/v5/backend/sftp/mocks" - "github.com/c2fo/vfs/v5/utils" + "github.com/c2fo/vfs/v6" + "github.com/c2fo/vfs/v6/backend/sftp/mocks" + "github.com/c2fo/vfs/v6/utils" ) type fileSystemTestSuite struct { diff --git a/backend/sftp/file_test.go b/backend/sftp/file_test.go index f9cdbaf4..f60fcab1 100644 --- a/backend/sftp/file_test.go +++ b/backend/sftp/file_test.go @@ -15,10 +15,10 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/suite" - "github.com/c2fo/vfs/v5" - "github.com/c2fo/vfs/v5/backend/sftp/mocks" - _mocks "github.com/c2fo/vfs/v5/mocks" - "github.com/c2fo/vfs/v5/utils" + "github.com/c2fo/vfs/v6" + "github.com/c2fo/vfs/v6/backend/sftp/mocks" + _mocks "github.com/c2fo/vfs/v6/mocks" + "github.com/c2fo/vfs/v6/utils" ) type fileTestSuite struct { diff --git a/backend/sftp/location.go b/backend/sftp/location.go index db242df6..3e436e42 100644 --- a/backend/sftp/location.go +++ b/backend/sftp/location.go @@ -9,8 +9,8 @@ import ( "strings" "unicode/utf8" - "github.com/c2fo/vfs/v5" - "github.com/c2fo/vfs/v5/utils" + "github.com/c2fo/vfs/v6" + "github.com/c2fo/vfs/v6/utils" ) // Location implements the vfs.Location interface specific to sftp fs. diff --git a/backend/sftp/location_test.go b/backend/sftp/location_test.go index c619a8c5..d96e0628 100644 --- a/backend/sftp/location_test.go +++ b/backend/sftp/location_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/suite" - "github.com/c2fo/vfs/v5/backend/sftp/mocks" - "github.com/c2fo/vfs/v5/utils" + "github.com/c2fo/vfs/v6/backend/sftp/mocks" + "github.com/c2fo/vfs/v6/utils" ) type locationTestSuite struct { diff --git a/backend/sftp/options.go b/backend/sftp/options.go index 9712dc13..7dd5c3b4 100644 --- a/backend/sftp/options.go +++ b/backend/sftp/options.go @@ -13,8 +13,8 @@ import ( "golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh/knownhosts" - "github.com/c2fo/vfs/v5" - "github.com/c2fo/vfs/v5/utils" + "github.com/c2fo/vfs/v6" + "github.com/c2fo/vfs/v6/utils" ) const systemWideKnownHosts = "/etc/ssh/ssh_known_hosts" diff --git a/backend/sftp/options_test.go b/backend/sftp/options_test.go index 0a67c220..3c0338f1 100644 --- a/backend/sftp/options_test.go +++ b/backend/sftp/options_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/suite" "golang.org/x/crypto/ssh" - "github.com/c2fo/vfs/v5/utils" + "github.com/c2fo/vfs/v6/utils" ) /********************************** diff --git a/backend/testsuite/backend_integration_test.go b/backend/testsuite/backend_integration_test.go index f7840c9e..c7546878 100644 --- a/backend/testsuite/backend_integration_test.go +++ b/backend/testsuite/backend_integration_test.go @@ -16,15 +16,15 @@ import ( "github.com/stretchr/testify/suite" - "github.com/c2fo/vfs/v5" - "github.com/c2fo/vfs/v5/backend/azure" - "github.com/c2fo/vfs/v5/backend/gs" - "github.com/c2fo/vfs/v5/backend/mem" - _os "github.com/c2fo/vfs/v5/backend/os" - "github.com/c2fo/vfs/v5/backend/s3" - "github.com/c2fo/vfs/v5/backend/sftp" - "github.com/c2fo/vfs/v5/utils" - "github.com/c2fo/vfs/v5/vfssimple" + "github.com/c2fo/vfs/v6" + "github.com/c2fo/vfs/v6/backend/azure" + "github.com/c2fo/vfs/v6/backend/gs" + "github.com/c2fo/vfs/v6/backend/mem" + _os "github.com/c2fo/vfs/v6/backend/os" + "github.com/c2fo/vfs/v6/backend/s3" + "github.com/c2fo/vfs/v6/backend/sftp" + "github.com/c2fo/vfs/v6/utils" + "github.com/c2fo/vfs/v6/vfssimple" ) type vfsTestSuite struct { diff --git a/docs/azure.md b/docs/azure.md index 778ae4df..9f7d7740 100644 --- a/docs/azure.md +++ b/docs/azure.md @@ -12,8 +12,8 @@ Rely on github.com/c2fo/vfs/backend ```go import( - "github.com/c2fo/vfs/v5/backend" - "github.com/c2fo/vfs/v5/backend/azure" + "github.com/c2fo/vfs/v6/backend" + "github.com/c2fo/vfs/v6/backend/azure" ) func UseFs() error { @@ -25,7 +25,7 @@ Rely on github.com/c2fo/vfs/backend Or call directly: ```go - import "github.com/c2fo/vfs/v5/backend/azure" + import "github.com/c2fo/vfs/v6/backend/azure" func DoSomething() { fs := azure.NewFilesystem() diff --git a/docs/backend.md b/docs/backend.md index b3e19998..b387ca78 100644 --- a/docs/backend.md +++ b/docs/backend.md @@ -15,9 +15,9 @@ In this way, a caller of vfs backends can simply load the backend file system // import backend and each backend you intend to use import( - "github.com/c2fo/vfs/v5/backend" - "github.com/c2fo/vfs/v5/backend/os" - "github.com/c2fo/vfs/v5/backend/s3" + "github.com/c2fo/vfs/v6/backend" + "github.com/c2fo/vfs/v6/backend/os" + "github.com/c2fo/vfs/v6/backend/s3" ) func main() { @@ -53,8 +53,8 @@ To create your own backend, you must create a package that implements the interf import( ... - "github.com/c2fo/vfs/v5" - "github.com/c2fo/vfs/v5/backend" + "github.com/c2fo/vfs/v6" + "github.com/c2fo/vfs/v6/backend" ) // IMPLEMENT vfs interfaces @@ -72,7 +72,7 @@ Then do use it in some other package do package MyExoticFilesystem import( - "github.com/c2fo/vfs/v5/backend" + "github.com/c2fo/vfs/v6/backend" "github.com/acme/myexoticfilesystem" ) diff --git a/docs/gs.md b/docs/gs.md index fa1a78ba..c9ab9fd5 100644 --- a/docs/gs.md +++ b/docs/gs.md @@ -8,12 +8,12 @@ Package gs Google Cloud Storage VFS implementation. ### Usage -Rely on [github.com/c2fo/vfs/v5/backend](backend.md) +Rely on [github.com/c2fo/vfs/v6/backend](backend.md) ```go import( - "github.com/c2fo/vfs/v5/backend" - "github.com/c2fo/vfs/v5/backend/gs" + "github.com/c2fo/vfs/v6/backend" + "github.com/c2fo/vfs/v6/backend/gs" ) func UseFs() error { @@ -25,7 +25,7 @@ Rely on [github.com/c2fo/vfs/v5/backend](backend.md) Or call directly: ```go - import "github.com/c2fo/vfs/v5/backend/gs" + import "github.com/c2fo/vfs/v6/backend/gs" func DoSomething() { fs := gs.NewFileSystem() diff --git a/docs/mem.md b/docs/mem.md index 0f539215..f05949a7 100644 --- a/docs/mem.md +++ b/docs/mem.md @@ -7,12 +7,12 @@ Package mem, in-memory backend VFS implementation. ### Usage -Rely on github.com/c2fo/vfs/v5/backend +Rely on github.com/c2fo/vfs/v6/backend ```go import( - "github.com/c2fo/vfs/v5/backend" - "github.com/c2fo/vfs/v5/backend/mem" + "github.com/c2fo/vfs/v6/backend" + "github.com/c2fo/vfs/v6/backend/mem" ) func UseFs() error { fs := backend.Backend(mem.Scheme) @@ -23,7 +23,7 @@ Rely on github.com/c2fo/vfs/v5/backend Or call directly: ```go - import _mem "github.com/c2fo/vfs/v5/backend/mem" + import _mem "github.com/c2fo/vfs/v6/backend/mem" func DoSomething() { fs := _mem.NewFileSystem() diff --git a/docs/os.md b/docs/os.md index 7a8d64ac..15f40c26 100644 --- a/docs/os.md +++ b/docs/os.md @@ -7,12 +7,12 @@ Package os built-in os lib VFS implementation. ### Usage -Rely on github.com/c2fo/vfs/v5/backend +Rely on github.com/c2fo/vfs/v6/backend ```go import( - "github.com/c2fo/vfs/v5/backend" - "github.com/c2fo/vfs/v5/backend/os" + "github.com/c2fo/vfs/v6/backend" + "github.com/c2fo/vfs/v6/backend/os" ) func UseFs() error { @@ -24,7 +24,7 @@ Rely on github.com/c2fo/vfs/v5/backend Or call directly: ```go - import _os "github.com/c2fo/vfs/v5/backend/os" + import _os "github.com/c2fo/vfs/v6/backend/os" func DoSomething() { fs := &_os.FileSystem{} diff --git a/docs/s3.md b/docs/s3.md index 16aa3a42..9c66b6a5 100644 --- a/docs/s3.md +++ b/docs/s3.md @@ -7,12 +7,12 @@ Package s3 AWS S3 VFS implementation. ### Usage -Rely on github.com/c2fo/vfs/v5/backend +Rely on github.com/c2fo/vfs/v6/backend ```go import( - "github.com/c2fo/vfs/v5/backend" - "github.com/c2fo/vfs/v5/backend/s3" + "github.com/c2fo/vfs/v6/backend" + "github.com/c2fo/vfs/v6/backend/s3" ) func UseFs() error { @@ -24,7 +24,7 @@ Rely on github.com/c2fo/vfs/v5/backend Or call directly: ```go - import "github.com/c2fo/vfs/v5/backend/s3" + import "github.com/c2fo/vfs/v6/backend/s3" func DoSomething() { fs := s3.NewFilesystem() diff --git a/docs/sftp.md b/docs/sftp.md index 71f3d34d..ffc5995d 100644 --- a/docs/sftp.md +++ b/docs/sftp.md @@ -11,12 +11,12 @@ to take up a large number of a server's available connections, so better to use ### Usage -Rely on github.com/c2fo/vfs/v5/backend +Rely on github.com/c2fo/vfs/v6/backend ```go import( - "github.com/c2fo/vfs/v5/backend" - "github.com/c2fo/vfs/v5/backend/sftp" + "github.com/c2fo/vfs/v6/backend" + "github.com/c2fo/vfs/v6/backend/sftp" ) func UseFs() error { @@ -28,7 +28,7 @@ Rely on github.com/c2fo/vfs/v5/backend Or call directly: ```go - import "github.com/c2fo/vfs/v5/backend/sftp" + import "github.com/c2fo/vfs/v6/backend/sftp" func DoSomething() { fs := sftp.NewFilesystem() diff --git a/docs/utils.md b/docs/utils.md index a257893b..49023580 100644 --- a/docs/utils.md +++ b/docs/utils.md @@ -4,7 +4,7 @@ ```go - import "github.com/c2fo/vfs/v5/utils" + import "github.com/c2fo/vfs/v6/utils" ``` #### Error Constants diff --git a/docs/vfssimple.md b/docs/vfssimple.md index 4e04a7bd..a4f26edc 100644 --- a/docs/vfssimple.md +++ b/docs/vfssimple.md @@ -18,7 +18,7 @@ Just import vfssimple. package main import( - "github.com/c2fo/vfs/v5/vfssimple" + "github.com/c2fo/vfs/v6/vfssimple" ) ... @@ -55,9 +55,9 @@ resolve the provided URI in NewFile() or NewLocation() to the registered file sy package main import( - "github.com/c2fo/vfs/v5/vfssimple" - "github.com/c2fo/vfs/v5/backend" - "github.com/c2fo/vfs/v5/backend/s3" + "github.com/c2fo/vfs/v6/vfssimple" + "github.com/c2fo/vfs/v6/backend" + "github.com/c2fo/vfs/v6/backend/s3" ) ... @@ -96,8 +96,8 @@ when calling remote file systems. This adds some flexibility in how a retry on f import( "time" - "github.com/c2fo/vfs/v5/backend" - "github.com/c2fo/vfs/v5/backend/gs" + "github.com/c2fo/vfs/v6/backend" + "github.com/c2fo/vfs/v6/backend/gs" ) ... diff --git a/go.mod b/go.mod index 795d08fe..4430320e 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/c2fo/vfs/v5 +module github.com/c2fo/vfs/v6 go 1.13 diff --git a/mocks/File.go b/mocks/File.go index fdf7ab61..f3bfc0a3 100644 --- a/mocks/File.go +++ b/mocks/File.go @@ -4,7 +4,7 @@ package mocks import mock "github.com/stretchr/testify/mock" import time "time" -import vfs "github.com/c2fo/vfs/v5" +import vfs "github.com/c2fo/vfs/v6" // File is an autogenerated mock type for the File type type File struct { diff --git a/mocks/FileSystem.go b/mocks/FileSystem.go index 14702a94..604be2aa 100644 --- a/mocks/FileSystem.go +++ b/mocks/FileSystem.go @@ -3,7 +3,7 @@ package mocks import mock "github.com/stretchr/testify/mock" -import vfs "github.com/c2fo/vfs/v5" +import vfs "github.com/c2fo/vfs/v6" // FileSystem is an autogenerated mock type for the FileSystem type type FileSystem struct { diff --git a/mocks/Location.go b/mocks/Location.go index b7ba3884..ae8ff383 100644 --- a/mocks/Location.go +++ b/mocks/Location.go @@ -4,7 +4,7 @@ package mocks import mock "github.com/stretchr/testify/mock" import regexp "regexp" -import vfs "github.com/c2fo/vfs/v5" +import vfs "github.com/c2fo/vfs/v6" // Location is an autogenerated mock type for the Location type type Location struct { diff --git a/utils/utils.go b/utils/utils.go index 97bbadaf..8a203a38 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -8,7 +8,7 @@ import ( "strings" "time" - "github.com/c2fo/vfs/v5" + "github.com/c2fo/vfs/v6" ) const ( diff --git a/utils/utils_test.go b/utils/utils_test.go index cc7d59d1..44b68861 100644 --- a/utils/utils_test.go +++ b/utils/utils_test.go @@ -10,9 +10,9 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/suite" - _os "github.com/c2fo/vfs/v5/backend/os" - "github.com/c2fo/vfs/v5/mocks" - "github.com/c2fo/vfs/v5/utils" + _os "github.com/c2fo/vfs/v6/backend/os" + "github.com/c2fo/vfs/v6/mocks" + "github.com/c2fo/vfs/v6/utils" ) /********************************** diff --git a/vfscp/vfscp.go b/vfscp/vfscp.go index 90de4afe..2704d36f 100644 --- a/vfscp/vfscp.go +++ b/vfscp/vfscp.go @@ -9,7 +9,7 @@ import ( "github.com/fatih/color" - "github.com/c2fo/vfs/v5/vfssimple" + "github.com/c2fo/vfs/v6/vfssimple" ) const usageTemplate = ` diff --git a/vfssimple/doc.go b/vfssimple/doc.go index 1c4159dd..97d5a8ab 100644 --- a/vfssimple/doc.go +++ b/vfssimple/doc.go @@ -11,7 +11,7 @@ Just import vfssimple. package main import( - "github.com/c2fo/vfs/v5/vfssimple" + "github.com/c2fo/vfs/v6/vfssimple" ) ... @@ -48,9 +48,9 @@ file system. package main import( - "github.com/c2fo/vfs/v5/vfssimple" - "github.com/c2fo/vfs/v5/backend" - "github.com/c2fo/vfs/v5/backend/s3" + "github.com/c2fo/vfs/v6/vfssimple" + "github.com/c2fo/vfs/v6/backend" + "github.com/c2fo/vfs/v6/backend/s3" ) ... diff --git a/vfssimple/vfssimple.go b/vfssimple/vfssimple.go index 917f75da..8c2db64d 100644 --- a/vfssimple/vfssimple.go +++ b/vfssimple/vfssimple.go @@ -7,10 +7,10 @@ import ( "path/filepath" "strings" - "github.com/c2fo/vfs/v5" - "github.com/c2fo/vfs/v5/backend" - _ "github.com/c2fo/vfs/v5/backend/all" // register all backends - "github.com/c2fo/vfs/v5/backend/azure" + "github.com/c2fo/vfs/v6" + "github.com/c2fo/vfs/v6/backend" + _ "github.com/c2fo/vfs/v6/backend/all" // register all backends + "github.com/c2fo/vfs/v6/backend/azure" ) // NewLocation is a convenience function that allows for instantiating a location based on a uri string. Any From 5f1add823cec064f7e2f5cd6793c32583c1c4089 Mon Sep 17 00:00:00 2001 From: Katie Hrenchir Date: Mon, 4 Oct 2021 17:05:43 -0500 Subject: [PATCH 09/12] Shorten line for linter --- doc.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc.go b/doc.go index 60db340a..d0d13928 100644 --- a/doc.go +++ b/doc.go @@ -47,7 +47,8 @@ Post 1.17: Upgrading Upgrading from v5 to v6 -With v6.0.0, we changed the Auth creation options to accept an array of Key Exchange algorithms rather than a string. To update, change the syntax of the auth commands. +With v6.0.0, we changed the Auth creation options to accept an array of Key Exchange algorithms rather than a string. +To update, change the syntax of the auth commands. "keyExchanges":"diffie-hellman-group-a256" becomes "keyExchanges":["diffie-hellman-group-a256"] From cceabb4a1c595dd10f67efa33a3c49b30c75baaa Mon Sep 17 00:00:00 2001 From: Katie Hrenchir Date: Tue, 5 Oct 2021 09:03:17 -0500 Subject: [PATCH 10/12] Update changelog language to be more clear --- CHANGELOG.md | 2 +- doc.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0aebf1a7..8733f728 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Upgrade steps -With v6.0.0, we changed the Auth creation options to accept an array of Key Exchange algorithms rather than a string. To update, change the syntax of the auth commands. +With v6.0.0, sftp.Options struct changed to accept an array of Key Exchange algorithms rather than a string. To update, change the syntax of the auth commands. ``` "keyExchanges":"diffie-hellman-group-a256" ``` diff --git a/doc.go b/doc.go index d0d13928..cb3e3c9c 100644 --- a/doc.go +++ b/doc.go @@ -47,7 +47,7 @@ Post 1.17: Upgrading Upgrading from v5 to v6 -With v6.0.0, we changed the Auth creation options to accept an array of Key Exchange algorithms rather than a string. +With v6.0.0, sftp.Options struct changed to accept an array of Key Exchange algorithms rather than a string. To update, change the syntax of the auth commands. "keyExchanges":"diffie-hellman-group-a256" becomes From ce88dce550f3ef7640bd83c8b18fbc6f19fb8dc7 Mon Sep 17 00:00:00 2001 From: Katie Hrenchir Date: Tue, 5 Oct 2021 09:04:11 -0500 Subject: [PATCH 11/12] go 1.13 -> go 1.16 --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 4430320e..d3049080 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/c2fo/vfs/v6 -go 1.13 +go 1.16 require ( cloud.google.com/go/storage v1.16.1 From d37ae0efe2eba1a2e66720ef7bba8349e450ad2c Mon Sep 17 00:00:00 2001 From: Katie Hrenchir Date: Tue, 5 Oct 2021 11:23:55 -0500 Subject: [PATCH 12/12] Add install & upgrade instructions to readme.md --- README.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0a1f6fd1..74c73f20 100644 --- a/README.md +++ b/README.md @@ -60,10 +60,27 @@ file system backends. ### Install -Go install: +Pre 1.17: +``` +go get -u github.com/c2fo/vfs/v6 +``` + +Post 1.17: +``` +go install -u github.com/c2fo/vfs/v6 +``` - go get -u github.com/c2fo/vfs/v6 +### Upgrading +#### Upgrading from v5 to v6 +With v6.0.0, sftp.Options struct changed to to accept an array of Key Exchange algorithms rather than a string. To update, change the syntax of the auth commands. +``` + "keyExchanges":"diffie-hellman-group-a256" +``` +becomes +``` + "keyExchanges":["diffie-hellman-group-a256"] +``` ### Usage